proto/p2/GameState.hh
changeset 4 e28b28b8817c
parent 3 5a209a8585c9
equal deleted inserted replaced
3:5a209a8585c9 4:e28b28b8817c
     1 #ifndef GAMESTATE_HH
     1 #ifndef GAMESTATE_HH
     2 #define GAMESTATE_HH
     2 #define GAMESTATE_HH
       
     3 
       
     4 #include "Dimension.hh"
     3 
     5 
     4 class GameState {
     6 class GameState {
     5 	public:
     7 	public:
     6 		Dimension map_dimensions;
     8 		Dimension map_dimensions;
     7 		std::list<Player> player_list;
     9 		std::list<Player> player_list;
    19 class Player {
    21 class Player {
    20 	private:
    22 	private:
    21 		Coordinate position;
    23 		Coordinate position;
    22 
    24 
    23 	public:
    25 	public:
       
    26 
       
    27 		Player(Coordinate c) : position(c) {}
       
    28 
    24 		PlayerType type;
    29 		PlayerType type;
    25 		Dimensions dimensions;
    30 		Dimensions dimensions;
    26 
    31 
    27 		Coordinate getPosition (void) {
    32 		Coordinate getPosition (void) const {
    28 			return this->position;
    33 			return this->position;
    29 		}
    34 		}
    30 };
    35 };
    31 
    36 
    32 class LocalPlayer : public Player {
    37 class LocalPlayer : public Player {