Package de.creepsmash.common.messages.server

Examples of de.creepsmash.common.messages.server.GameDescription


          }else if (count == 4) {
            GamePlayer4 = p;
          }
          count++;
        }
        gameDescriptions.add(new GameDescription(game.getGameId(),
            "[" + ((game.getCurrentPlayers() > 0) ? game.getPlayerScore()/game.getCurrentPlayers() : 0) + "]" + game.getGameName(),
            game.getMapId(),
            game.getMaxPlayers(),
            game.getCurrentPlayers(),
            game.getMaxEloPoints(),
View Full Code Here


   *
   *
   */
  public synchronized void setGameInfoEditorPaneSelectGame(int selectedRow) {

    GameDescription GameRow = this.games.get(selectedRow);
    java.net.URL imageURL = getClass().getClassLoader().getResource(
        IConstants.Map.getPictureThumbnailPath(IConstants.Map
            .getMapById(GameRow.getMapId()).toString()));

    String txt = "<div align=\"center\">" + "<small>"
        + GameRow.getGameName() +"<br>("
        + IConstants.Map.getMapById(GameRow.getMapId()).toString()
        + ")</small><hr>"
        + "<table border='0' style='border-collapse: collapse' width='270' height='102' cellpadding='3'>"
        + "<tr>" + "<td width='122' valign='top' height='102'>"
        + "<center>"
        + "  <img border='1' src='" + imageURL
        + "' width='100' height='100'></center></td>"
        + "  <td valign='top' width='150' height='102'>"
        + "  Player: "
        + GameRow.getCurrentPlayers() + " of "
        + GameRow.getMaxPlayers() + "<br>" + "  Status: "
        + GameRow.getState() + "<br>" + "  Min/Max: "
        + GameRow.getMinEloPoints() + " / " + GameRow.getMaxEloPoints()
        + "<br>" + "  PW: " + GameRow.getPasswort() + "<br>" + "  </td>"
        + "</tr>" + "</table>" + "</div>" + "<hr><b>Player in Game:</b> "
        + GameRow.getPlayer1() + " " + GameRow.getPlayer2() + " "
        + GameRow.getPlayer3() + " " + GameRow.getPlayer4() + "<br>"
        + "</font>";

    this.setGameInfoEditorPaneHTML(txt);
   
  }
View Full Code Here

  private void createGame(CreateGameResponseMessage g) {
    if (g.getResponseType().equals(IConstants.ResponseType.failed)) {
      errorDialog("Game already exists!");

    } else if (g.getResponseType().equals(IConstants.ResponseType.ok)) {
      GameDescription gd = new GameDescription();
      gd.setMaxPlayers(tPlayer.getSelectedIndex() + 2);
      gd.setMapId(this.selectMap);
      gd.setGameName(tName.getText());
      gd.setMaxEloPoints(Integer
          .valueOf(tMaxEloPoints.getSelectedIndex()) * 100);
      gd.setMinEloPoints(Integer
          .valueOf(tMinEloPoints.getSelectedIndex()) * 100);
      gd.setPasswort(tPasswort.getText());

      getCore().setActiveGame(gd);

      WaitingGamePanel wgp = new WaitingGamePanel();
      wgp.setMapId(this.selectMap);
View Full Code Here

TOP

Related Classes of de.creepsmash.common.messages.server.GameDescription

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.