Hey, I did a tic tac toe program 2 player. Now that im doing single player, to make an unbeatable AI, im mapping out every single movement, and moving accordingly. I decided to use nested select case to map the moves. Theres a problem though. Lets say its the 3rd move, how would i make my select case move three nested select cases in, so that the ai knows which move it is and how to move? Does anyone have any examples of single player ai that they did?
Last edited by andrew5578; Jan 24th, 2004 at 12:15 AM.
The Computer loops through them all. For example when it gets to 0 it checks (0,1,2), (0,3,6) and (0,4,8) to see if the player has two in a row, if it does, then the third square becomes our computers move. You've also got to check, if the squares are blank.
So For Example when the computer loops to 5, it checks (2,5,8) and (3,4,5).
Heres the game I did anyway.
Last edited by Peter1; Jan 24th, 2004 at 04:10 AM.