-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.h
More file actions
39 lines (36 loc) · 887 Bytes
/
server.h
File metadata and controls
39 lines (36 loc) · 887 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
#include <httplib.h>
#include <iostream>
#include <vector>
#include<string>
using namespace httplib;
using namespace std;
class Player{
public:
string name;
int p_x;
int p_y;
Player(string na, int x, int y){
name = na;
p_x = x;
p_y = y;
}
};
class Game{
private:
int no_of_player;
int map[11][11] = {0};
vector <Player> p;
public:
int winner_flag = 0;
int stop_flag = 0;
Game(int n = 2){
no_of_player = n;
}
string addPlayer(string);
int movementValidation();
string playerMovementHandler(int, char);
int getNoOfPlayers(){ return no_of_player ; }
void setNoOfPlayers(int n){no_of_player = n ; }
string renderMap();
string playerWallPlacementHandler(int , int, int );
};