May-10-2021, 11:44 AM
Look at your current code for flip
def flip(board, row, col, player, playerOpposite): while(row<len(board)-2 or col!=0): row+=1 col-=1 print(row,col) if (board[row][col]==playerOpposite): board[row][col]=playerYour while loop will continue as long as col is not zero. Given that col starts negative and you continue to subtract one from it, it will always be non-zero and it is an infinite loop.