TicTac


Written by:   Randy Giese
Written at:   www.RandyGrams.com
Written on:   July 25, 2012
Language:     VB.NET / Visual Basic 2010

This is my version of Tic-Tac-Toe, sometimes called "X's and O's".   This version allows a Human Player to play against the computer.   It's a "rigged" game because whoever goes 2nd (O) can only win if the first player makes a mistake.   Most games will be won by the "Cat".   Sorry!   I have no idea where that term came from.

"X" goes first (that's you).   The first letter can not be placed in the center square.   "O" goes second (that's the computer).


Menu Options

The About page which shows information about the program and it's creator.
The Help page shows the information displayed here.

Scores has 2 options:
Show Scores will display the current score in the center of the game board.
Clear Scores will erase all scores.
Click the "Red X" at the top of the Score window to hide it again.

There are 3 Levels of difficulty:
In the Easy Level, the computer will choose all of his moves randomly so it might still choose the center square once in a while, but this will give you a much better chance of winning.

In the Medium Level, the computer will try to "Win", otherwise his moves will be random.

In the Hard Level, the computer will always place his first letter in the center square.   After that he will look for places where he can win.   If he doesn't find any, then he will try to "Block" you from winning.

Computer logic used:

The computer will first look to see if it already has 2 squares in a Row, a Column or a Diagonal, with a blank square for the 3rd square.   If it finds one of these, it will place it's letter in the 3rd square, thereby winning the game.

If it doesn't see any place where it can win, it will look to see if the Human Player has 2 squares in a Row, a Column or a Diagonal, with a blank square for the 3rd square.   If it finds this situation, it will place it's letter in the 3rd square, to block the Human Player.

If it doesn't find either of these situations, it will place it's "O" randomly in any blank square.   In other words, the computer is examining the possibilities of the next move only.   It does not plan 2 or 3 moves ahead.


  •  
  • DownLoad   your free copy of   TicTac.Exe                         DownLoad   the   TicTac   VB.NET source files.
  •