Changeset d05c484 in network-game for common/Game.h


Ignore:
Timestamp:
Jan 19, 2014, 7:40:55 PM (11 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
e5697b1
Parents:
6054f1e
Message:

Some game-specific functions moved from server.cpp to the Game class and a function moved to the MessageProcessor class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/Game.h

    r6054f1e rd05c484  
    1414#include "WorldMap.h"
    1515#include "Projectile.h"
     16#include "MessageProcessor.h"
    1617
    1718using namespace std;
     
    2728   unsigned int redScore;
    2829   unsigned int unusedProjectileId;
     30   MessageProcessor* msgProcessor;
    2931
    3032public:
    3133   Game();
    32    Game(string name, string filepath);
     34   Game(string name, string filepath, MessageProcessor* msgProcessor);
    3335
    3436   ~Game();
     
    4446   void setRedScore(unsigned int score);
    4547
     48   void addObjectToMap(WorldMap::ObjectType objectType, int x, int y);
     49
    4650   map<unsigned int, Player*>& getPlayers();
    4751   bool addPlayer(Player* p);
     
    5559   bool processPlayerMovement(Player* p, FLOAT_POSITION oldPos);
    5660   int processFlagPickupRequest(Player* p);
     61   void dealDamageToPlayer(Player* p, int damage);
     62
     63   bool handleGameEvents();
     64   bool handlePlayerEvents(Player* p);
    5765
    5866   void assignProjectileId(Projectile* p);
Note: See TracChangeset for help on using the changeset viewer.