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

cboard.h

00001 #ifndef _CBOARD_H_
00002 #define _CBOARD_H_
00003 
00004 #include "board.h"
00005 
00007 
00012 class CBoard : public Board
00013 {
00014         public:
00016 
00019                 CBoard(char icon, char otherIcon);
00020                 
00022 
00029                 bool makeMove();
00030                 
00032 
00037                 class Spot
00038                 {
00039                         private:
00040                                 int x, y;
00041                                 bool allotted;
00042                         public:
00044                                 Spot() : allotted(false), x(0), y(0) {}
00045                                 
00047 
00051                                 void set(int xval, int yval);
00052                                 
00054 
00056                                 int getX() const {return x;}
00057                                 
00059 
00061                                 int getY() const {return y;}
00062                                 
00064 
00066                                 bool isAllotted() const {return allotted;}
00067                 };                              
00068         private:
00069                 Spot checkDefence(); //utilized by makeMove() to check for defensive moves
00070                 void makeRandomMove(); //utilized by makeMove() to make a random move
00071                 Spot checkOffence(); //utilized by makeMove() to check for offensive moves
00072                 Player player;
00073 };
00074 
00075 #endif //_CBOARD_H_

Generated on Thu Jan 19 19:15:21 2006 for TicTacToe by  doxygen 1.4.4