Package clueless.messaging

Examples of clueless.messaging.GameInitializationMessage


  public void handleMessageEvent(MessageEvent event) {
    //System.out.println("MainViewListener received message: " + event.getMessage().toString());
    if(event.getMessage() instanceof GameInitializationMessage)
    {

      GameInitializationMessage gameInit = (GameInitializationMessage)event.getMessage();


      //TODO: enable make accusation / suggestion button if players turn
      //TODO: this should really only occur after a move has been made (is it possible to decline moving?)
      if(gameInit.isTurn())
      {
        makeAccusation.setEnabled(true);
        makeSuggestion.setEnabled(true);
        endTurn.setEnabled(true);
      }
View Full Code Here


  @Override
  public void handleMessageEvent(MessageEvent event) {
    if(event.getMessage() instanceof GameInitializationMessage)
    {
      GameInitializationMessage gameInit = (GameInitializationMessage)event.getMessage();
      //TODO: something is going wrong with displayHand
      displayHand(gameInit.getHand());
      //this.userHandPanel.repaint();
    }
  }
View Full Code Here

  @Override
  public void handleMessageEvent(MessageEvent event) {
    //System.out.println("Message from " + event.getSource() + " : " + event.getMessage());
    if(event.getMessage() instanceof GameInitializationMessage){
      GameInitializationMessage gameInit = (GameInitializationMessage)event.getMessage();
      return;
    }else if(event.getMessage() instanceof CurrentLocationRequestMessage){
      Vector<Location> spaces = this.game.getSpaces();
      CurrentLocationRequestMessage msg = ((CurrentLocationRequestMessage)event.getMessage());
      if(isServer)
View Full Code Here

        this.fireTextStatusEvent(new TextStatusEvent(this, "Last player joined."));
        //Once number of clients connect = number of players in the game,
        //send game init message which includes hands
        for(Player player : this.game.getPlayers())
        {
          server.send(player, new GameInitializationMessage(player.getHand(), (player.getUUID().equals(this.getCurrentPlayer()))));
          //server.getClientThread(player)
          //server.send(player, new SendClientPlayerMessage(player));
          //System.out.println("playerSent: " + player.getCharacter());
        }
      }
View Full Code Here

TOP

Related Classes of clueless.messaging.GameInitializationMessage

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.