Wiki Home

Tic Tac Toe


Namespace: WIN_COM_API


This is a good example of how this wiki supports scripting.
Would you like to play a game?
Mouse-click in a square, type in an "X", and click the button marked "I'm Done, Your Turn" to take a square. (Can also use "x" and use tab key). Click "Start Over" to reset the board.
 

Perhaps someone who knows Java Script better than I should add a block of code in the area around the "// JUST FILL THE FIRST BLANK SPOT" comment to take the middle square if it is open. Otherwise, one can win every game by starting in one corner and then taking two more corners. :^>
Okay, I have improved the AI and added tie game functionality. I hope you're happy. :)

Could add a randomizing factor, and fix holes in logic. There are still ways to win.
Played yet more with the style. I know I'm going overboard, but it's so addictive!

This is a good example of the differences between MSIE and Navigator and what style information each browser supports. (see Cascading Style Sheet Why Not Netscape for more CSS information) -- Tom Gehrke
See also Prolog Interpreter, AutoRecentChanges
Category Games
( Topic last updated: 2005.05.01 03:30:18 AM )