/** * 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)); }
/** * 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)); }
/** * 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)); }
/** * sends a draw tile to the client * * @param tiles is a list with blocks */ public void sendDrawTile(List<Block> tiles) { sendRaw(ProtocolFormatter.drawTile(tiles)); }