Changeset d436ac4 in network-game for common/Player.h


Ignore:
Timestamp:
May 18, 2013, 6:36:54 PM (12 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
7efed11
Parents:
7f2cef0
Message:

Modified the player class to include the team and whether the player has either of the flags

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/Player.h

    r7f2cef0 rd436ac4  
    2323   Player(const Player& p);
    2424   Player(string name, string password);
    25    Player(string name, sockaddr_in addr); // this will be deleted
    2625
    2726   ~Player();
     
    3332   void setAddr(sockaddr_in addr);
    3433
     34   void draw(POSITION pos, bool curPlayer);
    3535   bool move(WorldMap *map);
     36
     37   void takeFlag(int flag, WorldMap *map);
     38   void dropFlag(int flag, WorldMap *map);
    3639
    3740   int id;
     
    4245   POSITION target;
    4346   unsigned long long timeLastUpdated;
     47
     48   int team; // 0 is blue, 1 is red
     49      bool hasBlueFlag;
     50   bool hasRedFlag;
    4451};
    4552
Note: See TracChangeset for help on using the changeset viewer.