Changeset 45734ff in network-game for common/Game.h


Ignore:
Timestamp:
Dec 22, 2013, 10:14:43 PM (11 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
58ca135
Parents:
1d96513
Message:

The Game class stores a list of projectiles present in that game

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/Game.h

    r1d96513 r45734ff  
    2626   int blueScore;
    2727   int redScore;
     28   unsigned int unusedProjectileId;
    2829
    2930public:
     
    3536   string getName();
    3637   int getNumPlayers();
    37    map<unsigned int, Player*>& getPlayers();
    38    map<unsigned int, Projectile>& getProjectiles();
    3938   int getBlueScore();
    4039   int getRedScore();
     
    4544   void setRedScore(int score);
    4645
     46   map<unsigned int, Player*>& getPlayers();
    4747   bool addPlayer(Player* p);
    4848   bool removePlayer(unsigned int id);
     49
     50   map<unsigned int, Projectile>& getProjectiles();
     51   bool addProjectile(Projectile p);
     52   bool removeProjectile(unsigned int id);
     53
    4954   bool startPlayerMovement(unsigned int id, int x, int y);
    5055   bool processPlayerMovement(Player* p, FLOAT_POSITION oldPos);
    5156   int processFlagPickupRequest(Player* p);
    5257
    53    bool addProjectile(Projectile p);
    54    bool removeProjectile(unsigned int id);
     58   void assignProjectileId(Projectile* p);
     59   void updateUnusedProjectileId();
    5560};
    5661
Note: See TracChangeset for help on using the changeset viewer.