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();
00070 void makeRandomMove();
00071 Spot checkOffence();
00072 Player player;
00073 };
00074
00075 #endif //_CBOARD_H_