-
Notifications
You must be signed in to change notification settings - Fork 0
/
CGame.h
44 lines (36 loc) · 1.04 KB
/
CGame.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
#ifndef SEMESTRAL_WORK_CGAME_H
#define SEMESTRAL_WORK_CGAME_H
#include <iostream>
#include <fstream>
#include <vector>
#include <cstdlib>
#include <memory>
#include "CUnit.h"
#include "CCharacter.h"
#include "CBenefit.h"
#include <ncurses.h>
using namespace std;
//----------------------------------------------------------------------------------------------------------------------
class CGame{
public:
explicit CGame(ifstream & ifs);
~CGame() = default;
void Draw();
void Input();
void Logic();
bool Running();
void SetPlayerDirection(const DirectionType & direction);
private:
bool isRunning;
int Width;
int Height;
vector<vector<shared_ptr<CUnit>>> Map;
int P_x;
int P_y;
DirectionType PlayerDirection;
int PlayerLife;
int PlayerAmmo;
void Swap(int a_x, int a_y, int b_x, int b_y);
};
//----------------------------------------------------------------------------------------------------------------------
#endif //SEMESTRAL_WORK_CGAME_H