public synchronized void deletePlayer(String data) {
    try {
      String log;
      StringTokenizer ST = new StringTokenizer(data);
      ST.nextToken();
      String name = ST.nextToken();
      int player = Integer.parseInt(ST.nextToken());
      int gameID = Integer.parseInt(ST.nextToken());
      log = "server: deleting player " + player + " in Game " + name + " ID:" + gameID + "\n";
      System.out.print(log);
      log(log, port);

      for (int i = 0; i < games.size(); i++) {
        Game game = (Game) games.elementAt(i);

        if (game.getNameOfTheGame().equals(name) && gameID == game.getGameID()) {
          game.delete(player);

          if (game.getPlayers().size() == 0) {
            games.remove(i);
            System.out.println("server: game " + (i + 1) + " removed from list");
          }
        }
      }
    } catch (NoSuchElementException e) {
      String log = "server: corrupt message in method deletePlayer\n";
      System.out.print(log);
      log(log, port);
    }
  }