ravcam
Jan 7th, 2000, 03:26 AM
Yes. I recently made a program like this. What I did was make the user enter a selection as to who would go first. If the computer went first it would always move to the center square. If it was second it would first move to the center square and if not possible move to one of the corners. If the computer had made the first move and the player had made his first move it would search for a corner to move to. The only other time it would be nessacary to program a move other than the logic moves mentioned in the second message is if the computer has the center square and the player ocuppies 2 squares directly adjacent on the same plain. By this move the program should be able to check for a block and be able to almost randomly select a move in a dead end game to keep the player on their toes. By the way, using this statagy will allow the computer to make 85% of games tie and win 5% and lose 10%.(or at least that is what I have calculated) Try it! Also the source code is not currently availabe for me to show you, unfortuatly the game got wiped out when I formated! O well, shows you why you should make back up copies!