Package game.dice

Examples of game.dice.Dice


    if(inObj == null)client.getConnection().broadcast(CommandList.GOTNULLCMD);
   
    switch(client.getState()){
    case INITIATING_CONNECTION:
      if(inObj.getClass().getSimpleName().equals("Dice")){
        Dice initDice = (Dice)inObj;
        client.setDice(initDice);
      }
      if(inObj.getClass().getSimpleName().equals("GameSheet")){
        GameSheet initSheet = (GameSheet)inObj;
        client.setGameSheet(initSheet);
      }
      if(inObj.getClass().getSimpleName().equals("Leaderboard")){
        Leaderboard initBoard = (Leaderboard)inObj;
        client.setLeaderboard(initBoard);
      }
      if(inObj.getClass().getSimpleName().equals("PlayerList")){
        PlayerList refPlayers = (PlayerList)inObj;
        client.getJoinedList().refreshPlayerList(refPlayers);
        client.getCurrentFrame().updateGUIForeign();
      }
      if(inObj.getClass().getSimpleName().equals("Message")){
        Message inboundMsg = (Message)inObj;
        processMessageInput(inboundMsg);
      }
      //client.getConnection().sendRcvdConfirmation(inObj);    //TEMPORARILY DISABLED
      break;
    case GAME_IN_PROGRESS:
      if(inObj.getClass().getSimpleName().equals("Dice")){
        Dice refreshedDice = (Dice)inObj;
        client.getDice().refershDice(refreshedDice);
        client.getCurrentFrame().updateGUIForeign();
        //System.out.println("Hetket�ringute (" + client.getDice().getDiceValues() + ") omanik: " + client.getDice().getCurOwner());
      }
      if(inObj.getClass().getSimpleName().equals("GameSheet")){
View Full Code Here


          fromClient = netIn.readObject();
        } catch (ClassNotFoundException e) {
          e.printStackTrace();
        }
        if(fromClient.getClass().getSimpleName().equals("Dice")){
        Dice diceFromClient = (Dice) fromClient;
        System.out.println(diceFromClient.toString());
        outQueue.addObject(diceFromClient);
        }else if(fromClient.getClass().getSimpleName().equals("GameSheet")){
          GameSheet gamesheetFromClient = (GameSheet)fromClient;
          outQueue.addObject(gamesheetFromClient);
        }
View Full Code Here

  /**
   * Resets the room variables.
   */
  public void resetRoom() {
    gameSheet = new GameSheet(size);
    dice = new Dice(5);
    dice.generateNeutralDice();
    clients = new ArrayList<ClientHandler>();
    inProgress = false;
  }
View Full Code Here

TOP

Related Classes of game.dice.Dice

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.