Changeset f41a7f9 in network-game for common


Ignore:
Timestamp:
Sep 26, 2013, 10:07:24 PM (11 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
f203c5c
Parents:
b92e6a7
Message:

Each player now holds a reference to their current game

Location:
common
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • common/Player.cpp

    rb92e6a7 rf41a7f9  
    3232   this->hasBlueFlag = false;
    3333   this->hasRedFlag = false;
     34
     35   this->currentGame = NULL;
    3436}
    3537
     
    6163   this->hasBlueFlag = p.hasBlueFlag;
    6264   this->hasRedFlag = p.hasRedFlag;
     65
     66   this->currentGame = p.currentGame;
    6367}
    6468
     
    8892   this->hasBlueFlag = false;
    8993   this->hasRedFlag = false;
     94
     95   this->currentGame = NULL;
    9096}
    9197
  • common/Player.h

    rb92e6a7 rf41a7f9  
    1818
    1919using namespace std;
     20
     21//forward declaration
     22class Game;
    2023
    2124class Player {
     
    7780   bool hasBlueFlag;
    7881   bool hasRedFlag;
     82
     83   Game* currentGame;
    7984};
    8085
Note: See TracChangeset for help on using the changeset viewer.