Package clueless.messaging

Examples of clueless.messaging.AvailableMoveMessage


        }
      }else if(event.getMessage() instanceof MoveMessage){
        MoveMessage msg = (MoveMessage)event.getMessage();
        movePawn(msg.getCharacterName(), msg.getOldLocation(), msg.getNewLocation());
      }else if (event.getMessage() instanceof AvailableMoveMessage){
        AvailableMoveMessage msg = (AvailableMoveMessage)event.getMessage();
        for(Location location : msg.getLocations()){
          this.showButton(location, msg.getCharacterName());
        }
      }
    }
  }
View Full Code Here


              if(((Hallway)space).getHallwayName() == hallwy){
                currHallwy = (Hallway)space;
              }
            }
          }
          server.send(currentPlayer, new AvailableMoveMessage(game.getValidMoves(currHallwy), currentPlayer.getCharacter()));
        }
      }
    }else if(event.getMessage() instanceof EndTurnMessage){
      if(isServer){
        //Move to the next player when we receive this message
        this.getNextPlayer();
        //TODO: Send available move message?  This still needs to be tested
        for(Location location : game.getSpaces()){
          Player player = location.getPlayer();
          if(player != null){
            if(player.getUUID().equals(currentPlayer.getUUID())){
              server.send(currentPlayer, new AvailableMoveMessage(game.getValidMoves(location), currentPlayer.getCharacter()));
              fireTextStatusEvent(new TextStatusEvent(this, "It is now " + currentPlayer.getCharacter() + "'s turn."))
            }
          }
        }
      }
View Full Code Here

TOP

Related Classes of clueless.messaging.AvailableMoveMessage

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.