-
Notifications
You must be signed in to change notification settings - Fork 0
/
Field.h
51 lines (42 loc) · 873 Bytes
/
Field.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
47
48
49
50
51
#pragma once
#include "Cell.h"
#include "Player.h"
#include <vector>
#include <string>
#include "InfoLog.h"
#include "Subject.h"
#include "ErrorObserver.h"
#include "GameObserver.h"
#include "StatusObserver.h"
class Field : public Subject
{
private:
int height;
int width;
std::vector< std::vector<Cell>> cells;
int x;
int y;
Player* player;
InfoLog* log_info;
std::string log_text;
public:
Field();
Field(int, int, Player*, InfoLog*);
Field(const Field&);
Field& operator=(const Field&);
Field(Field&&);
~Field();
void SetX(int);
void SetY(int);
void MoveUp();
void MoveDown();
void MoveLeft();
void MoveRight();
void InitCells();
int GetHeight();
int GetWidth();
int GetX();
int GetY();
std::vector<std::vector<Cell>>* GetField();
void updateEvents();
};