Changeset b48ef09 in network-game for common


Ignore:
Timestamp:
Sep 27, 2013, 3:43:51 PM (11 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
7d8d5d3
Parents:
803566d
Message:

New message types and server code for creating and joining games

Location:
common
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • common/Game.cpp

    r803566d rb48ef09  
    4848
    4949bool Game::addPlayer(Player* p) {
    50    if (players.count(p->id) == 0) {
     50   if (players.find(p->id) == players.end()) {
    5151      players[p->id] = p;
    5252      return true;
  • common/MessageContainer.h

    r803566d rb48ef09  
    3535#define MSG_TYPE_LEAVE_GAME        19
    3636#define MSG_TYPE_GAME_INFO         20
     37#define MSG_TYPE_JOIN_GAME_INFO    21
     38#define MSG_TYPE_JOIN_GAME_FAILURE 22
     39#define MSG_TYPE_JOIN_GAME_ACK     23
    3740
    3841typedef struct
Note: See TracChangeset for help on using the changeset viewer.