-
Notifications
You must be signed in to change notification settings - Fork 0
/
player.h
45 lines (37 loc) · 780 Bytes
/
player.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
//T09_G12
#ifndef PLAYER_H
#define PLAYER_H
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <limits>
#include <algorithm>
#include <stdio.h>
#include <chrono>
#include <iomanip>
#include <algorithm>
//our files
#include "Move_pos.h"
//store the player info
class Player {
public:
Player();
Player(int row, int col);
int getRow() const;
int getCol() const;
char getSymbol() const;
void setRow(int row_set);
void setCol(int col_set);
bool isAlive() const; //return if player is alive
void setAsDead(); //set the player as dead
void move(Movement delta);
private:
int row, col;
bool alive;
char symbol;
};
//constants
const char player_alive = 'H';
const char player_dead = 'h';
#endif