Main Page | Class Hierarchy | Class List | File List | Class Members

CBoard Class Reference

The AI tic-tac-toe board. More...

#include <cboard.h>

Inheritance diagram for CBoard:

Board List of all members.

Public Member Functions

 CBoard (char icon, char otherIcon)
 Constructor.
bool makeMove ()
 Make an automated move.

Classes

class  Spot
 Represents a spot on a CBoard. More...

Detailed Description

The AI tic-tac-toe board.

This class provides the means to add a computer-controlled player to the game.

See also:
Board
Author:
Jesse H-K
Date:
Jan 18, 2006


Constructor & Destructor Documentation

CBoard::CBoard char  icon,
char  otherIcon
 

Constructor.

Parameters:
icon assign this as the computer's icon
otherIcon assign this as the opposite of the computer's icon


Member Function Documentation

bool CBoard::makeMove  ) 
 

Make an automated move.

This method allows for the automation of a computer-player's move based on logical rules. The method will first look for a offensive move and place its icon accordingly. Failing the location of an offensive move, the computer will search for a defensive move eg, a block. Lastly, if there are no other moves, the computer will make a random move on the board, provided that it is an allowable move.

Returns:
returns true if a move move was made successfully, false otherwise


The documentation for this class was generated from the following files:
Generated on Thu Jan 19 19:15:21 2006 for TicTacToe by  doxygen 1.4.4