-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTicTacToe.h
More file actions
45 lines (35 loc) · 812 Bytes
/
Copy pathTicTacToe.h
File metadata and controls
45 lines (35 loc) · 812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include <stdio.h>
#include "Board.h"
#include "DummyPlayers.h"
#include "Player.h"
#include "Coordinate.h"
#include "Champion.h"
using namespace std;
#pragma once
class TicTacToe{
private:
int sizeBoard;
Board game;
Player* Winner;
public:
//constructors
TicTacToe(){
sizeBoard = 0;
}
TicTacToe(int size)
{
sizeBoard = size;
game.resize(size);
}
Board board() const;
Player& winner() const;
void play(Player& xPlayer, Player& oPlayer);
bool turn(char player, Player& xPlayer, Player& oPlayer);
bool GameWinned(Board board, Coordinate c, char player);
void Rival(Player& xPlayer, Player& oPlayer);
bool isPlayer(Coordinate c, char player);
};
struct Count{
int sum;
bool flag;
};