Ejemplo n.º 1
0
 /**
  * TODO - Verify Completion
  *
  * <p>Places a Road for the specified player at specified edgeLocation
  *
  * @pre canDoPlaceRoadOnEdge != false
  * @param UserId
  * @throws Exception
  * @return Void
  */
 public void placeRoadOnEdge(int UserId, EdgeLocation edgeLocation) throws Exception {
   if (canDoPlaceRoadOnEdge(UserId, edgeLocation) == false) {
     throw new Exception("Specified Player cannot place a road on the given edgeLocation");
   }
   // If we are in the setup phase, the rules for placing a road are slightly different
   if (turnNumber < 2) {
     board.placeInitialRoadOnEdge(getCurrentPlayer(), edgeLocation);
     versionNumber++;
   } else {
     board.placeRoadOnEdge(getCurrentPlayer(), edgeLocation);
   }
 }