Go to the documentation of this file.00001
00012 #ifndef TICTACTOE_H
00013 #define TICTACTOE_H
00014
00015
00018 #define EMPTY 0
00019
00021 #define CROSS 1
00022
00024 #define CIRCLE 2
00025
00027 #define DRAW 3
00028
00029
00030
00031 using namespace std;
00032
00039 class TicTacToe
00040 {
00041
00042
00043 public:
00044
00045
00046 TicTacToe(void);
00047 void DrawGame(void);
00048 void Reset(void);
00049 char CurrentPlayer(void);
00050 char Play(int NumCell);
00051 int Undo(void);
00052 char GameOver(void);
00053
00054
00055 private:
00056 char Grid[9];
00057 int NumMoves;
00058 int History[9];
00059 };
00060
00061 #endif // TICTACTOE_H
00062