-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cell.h
47 lines (42 loc) · 787 Bytes
/
Cell.h
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
46
/*
* File: Cell.h
* Author: Emre OZGUN
*
* Prototype(Header file) of Cell class
*/
#ifndef CELL_H
#define CELL_H
namespace ConnectFourGame
{
using std::istream;
using std::ostream;
//All cell type for user1,user2 and empty cells
typedef enum
{
Empty= '*',
user1 = 'X',
user1_x = 'x',
user2_o = 'o',
user2 = 'O',
} Celltype ;
class Cell
{
public:
//Constructors
Cell();
Cell(char position, int rowNum,Celltype type);
//Getters
int getPosition() const;
Celltype getType() const;
//Setters
void setPosition(char position );
void setType(Celltype type);
virtual Cell & operator = (const Cell &rightSideObje);
//Private data members
private:
char position;
int rowNum;
Celltype type;
};
}
#endif // CELL_H