summaryrefslogtreecommitdiffstats
path: root/Bachelor/Prog1/Prakt6/prg1p6_2/tictactoe.h
diff options
context:
space:
mode:
Diffstat (limited to 'Bachelor/Prog1/Prakt6/prg1p6_2/tictactoe.h')
-rw-r--r--Bachelor/Prog1/Prakt6/prg1p6_2/tictactoe.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/Bachelor/Prog1/Prakt6/prg1p6_2/tictactoe.h b/Bachelor/Prog1/Prakt6/prg1p6_2/tictactoe.h
new file mode 100644
index 0000000..27929e8
--- /dev/null
+++ b/Bachelor/Prog1/Prakt6/prg1p6_2/tictactoe.h
@@ -0,0 +1,36 @@
+// Programmieren 1, Praktikum 6, Aufgabe 1
+// Author: Sven Eisenhauer
+// Date: 14.01.2005
+// File: tictactoe.h
+// Description: class TicTacToe
+
+#ifndef TICTACTOE_1
+#define TICTACTOE_1
+
+class TicTacToe
+{
+public:
+ TicTacToe();
+ ~TicTacToe();
+ void playOneGame();
+private:
+ char field[9];
+ const int nrFields;
+ int round;
+ char *nextPlayer;
+ char *winner;
+ void print();
+ void printWinner();
+ void welcome();
+ void setNext(char *n) {nextPlayer=n;}
+ void setBeginner();
+ void setWinner();
+ char * getNext() {return nextPlayer;}
+ char * getWinner() {return winner;}
+ void movePlayer();
+ void moveComputer();
+ void eraseField();
+ int testField(int);
+};
+
+#endif \ No newline at end of file