From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001 From: Sven Eisenhauer Date: Fri, 10 Nov 2023 15:11:48 +0100 Subject: add new repo --- Bachelor/Prog1/Prakt6/prg1p6_2/tictactoe.h | 36 ++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Bachelor/Prog1/Prakt6/prg1p6_2/tictactoe.h (limited to 'Bachelor/Prog1/Prakt6/prg1p6_2/tictactoe.h') 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 -- cgit v1.2.3