Esempio n. 1
0
 /**
  * sends a put move to the client
  *
  * @param move is a map with the points and blocks
  */
 public void sendMovePut(Map<Point, Block> move) {
   sendRaw(ProtocolFormatter.serverMovePut(move));
 }
Esempio n. 2
0
 /**
  * ends the game
  *
  * @param won whether the game finished by a player winning or not
  * @param scores is a map with integers and strings
  */
 public void endGame(boolean won, Map<Integer, String> scores) {
   game = null;
   sendRaw(ProtocolFormatter.endGame(won, scores));
 }
Esempio n. 3
0
 /**
  * starts a new game
  *
  * @param serverGame is a ServerGame
  * @param players is a list with SocketPlayers
  */
 public void startGame(ServerGame serverGame, List<SocketPlayer> players) {
   game = serverGame;
   sendRaw(ProtocolFormatter.startGame(players));
 }
Esempio n. 4
0
 /**
  * sends a draw tile to the client
  *
  * @param tiles is a list with blocks
  */
 public void sendDrawTile(List<Block> tiles) {
   sendRaw(ProtocolFormatter.drawTile(tiles));
 }