bejnr.blogg.se

My 4.5 yr old doesnt get tic tac toe
My 4.5 yr old doesnt get tic tac toe









my 4.5 yr old doesnt get tic tac toe

Does anybody know why ? (The problem can only be in the MiniMax function, or the nextMove function. #Switches player depending on who's turn it is.I have implemented a TicTacToe algorythm with MiniMax, but the problem is that the computer always just places an 'x' on the next possible spot instead of evaluating the game. Row3 = gameboard = gameboard = gameboardĬolumn1 = gameboard = gameboard = gameboardĬolumn2 = gameboard = gameboard = gameboardĬolumn3 = gameboard = gameboard = gameboardĭiag1 = gameboard = gameboard = gameboardĭiag2 = gameboard = gameboard = gameboard #checks rows for a win, by comparing if the elements in the row are the same #Checks if the game is over by checking for a win or tie: While the game of tic-tac-toe is really old, dating back to ancient Egyptians at around 1300 B.C., the underlying principles of the game have endured the test of time. Print(" | " + gameboard + " | " + gameboard + " | " + gameboard + " | ")

my 4.5 yr old doesnt get tic tac toe

Print("These are their markers:", marker) Print("These are the players:", player_list) Name2 = input("Fill in the name of player 2: ") Name1 = input("Fill in the name of player 1: ")

my 4.5 yr old doesnt get tic tac toe

Here's the full code print ("*** Welcome to Tic Tac Teen ***") Meaning I can't do a check to see if there are no empty spots left The spots in the tic tac toe board have to be numbers from 1-9 so I can't replace them with empty spaces. While the game of tic-tac-toe is really old, dating back to ancient Egyptians at around 1300 B.C., the underlying principles of the game have endured the test of time. You can still see I have some attempts left over. For a school assignment I need to make tic tac toe, I've got pretty much everything ready, except for 1 issue, I don't know how to make the game know when it's a draw and then quit











My 4.5 yr old doesnt get tic tac toe