src/proto2/GameState.cc
changeset 26 5685602aeb9c
child 35 e21cfda0edde
child 50 9e1a6506f5a1
equal deleted inserted replaced
25:af75a1894a32 26:5685602aeb9c
       
     1 
       
     2 #include "GameState.hh"
       
     3 
       
     4 bool Player::updatePosition (Coordinate p) {
       
     5     if (!state.isValidCoordinate(p)) {
       
     6         // out-of-bounds
       
     7         return false;
       
     8 
       
     9     } else {
       
    10         // valid
       
    11         position = p;
       
    12 
       
    13         return true;
       
    14     }
       
    15 }
       
    16 
       
    17 
       
    18