-
Notifications
You must be signed in to change notification settings - Fork 1
/
GameField.h
37 lines (34 loc) · 877 Bytes
/
GameField.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
#ifndef _GAMEFIELD_H_
#define _GAMEFIELD_H_
#include "Cell.h"
class GameField {
public:
GameField();
GameField(uint8_t xSize, uint8_t ySize, uint8_t zSize, uint8_t playersCount);
~GameField();
Player* getPlayer(Color color);
Player* getOwner(uint8_t x, uint8_t y, uint8_t z);
bool setOwner(Player* player, uint8_t x, uint8_t y, uint8_t z);
Player* nextPlayer(Player* currentPlayer);
uint8_t getPlayersCount();
Cell* getCell(uint8_t x, uint8_t y, uint8_t z);
Cell* getCell(uint8_t index);
uint8_t index(uint8_t x, uint8_t y, uint8_t z);
uint8_t getCubeSize();
bool getMoveAbility();
bool isMoveAble();
bool animate();
void reset();
private:
Player* _players;
uint8_t _xSize;
uint8_t _ySize;
uint8_t _zSize;
uint8_t _cubeSize;
uint8_t _playersCount;
Cell* _field;
bool _moveAbility;
void clearOwners();
void addStraight(Straight straight);
};
#endif