src/GameState.hh
changeset 225 22ecb9cb9245
parent 222 293ddf4c067d
child 233 ff4ecea83cf5
equal deleted inserted replaced
224:e6faefba2ec1 225:22ecb9cb9245
     4 class GameState;
     4 class GameState;
     5 
     5 
     6 #include "PhysicsWorld.hh"
     6 #include "PhysicsWorld.hh"
     7 #include "Player.hh"
     7 #include "Player.hh"
     8 #include "Projectile.hh"
     8 #include "Projectile.hh"
       
     9 #include "Rope.hh"
     9 #include "Input.hh"
    10 #include "Input.hh"
    10 #include "Config.hh"
    11 #include "Config.hh"
    11 
    12 
    12 #include <list>
    13 #include <list>
    13 #include <stdexcept>
    14 #include <stdexcept>
    15 
    16 
    16 class GameState {
    17 class GameState {
    17 public:
    18 public:
    18     std::list<Player*> player_list;
    19     std::list<Player*> player_list;
    19     std::list<Projectile*> projectiles;
    20     std::list<Projectile*> projectiles;
       
    21     std::list<Rope*> ropes;
    20     PhysicsWorld world;
    22     PhysicsWorld world;
    21 
    23 
    22     // only one local player is supported
    24     // only one local player is supported
    23     LocalPlayer *local_player;
    25     LocalPlayer *local_player;
    24 
    26 
    25     GameState (void);
    27     GameState (void);
    26     
    28     
    27     void addProjectile(Projectile *projectile);
    29     void addProjectile(Projectile *projectile);
       
    30     void addRope(Rope *rope);
    28 
    31 
    29     /*
    32     /*
    30      * This will return NULL if we don't have a local player - yet
    33      * This will return NULL if we don't have a local player - yet
    31      */
    34      */
    32     LocalPlayer *getLocalPlayer (void);
    35     LocalPlayer *getLocalPlayer (void);