diff options
| author | Sven Eisenhauer <sven@sven-eisenhauer.net> | 2023-11-10 15:11:48 +0100 |
|---|---|---|
| committer | Sven Eisenhauer <sven@sven-eisenhauer.net> | 2023-11-10 15:11:48 +0100 |
| commit | 33613a85afc4b1481367fbe92a17ee59c240250b (patch) | |
| tree | 670b842326116b376b505ec2263878912fca97e2 /Bachelor/Prog1/Prakt6/prg1p6_2/tictactoe.h | |
| download | Studium-33613a85afc4b1481367fbe92a17ee59c240250b.tar.gz Studium-33613a85afc4b1481367fbe92a17ee59c240250b.tar.bz2 | |
Diffstat (limited to 'Bachelor/Prog1/Prakt6/prg1p6_2/tictactoe.h')
| -rw-r--r-- | Bachelor/Prog1/Prakt6/prg1p6_2/tictactoe.h | 36 |
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 |
