Examples of NEMessage


Examples of de.nameless.gameEngine.system.lan.messages.NEMessage

    if (in == null)
      openCannel();

    while (connected) {
      try {
        NEMessage m = (NEMessage) in.readObject();
        this.incomming.add(m);
        if (m instanceof NERemoteSyso)
          System.out.println(m);
      } catch (ClassNotFoundException e) {
        e.printStackTrace();
View Full Code Here

Examples of de.nameless.gameEngine.system.lan.messages.NEMessage

   * liefert die die erste nachricht die an der Verbindung anliegt
   *
   * @return
   */
  public NEMessage popMessage() {   
      NEMessage results = incomming.poll();
      return results;   
  }
View Full Code Here

Examples of de.nameless.gameEngine.system.lan.messages.NEMessage

   * @param typ
   * @return
   */
  public NEMessage waitOnNextMessage(int typ) {
    waitingOwner = true;
    NEMessage result = null;

    while (waitingOwner) {

      if (this.available()) {
        for (NEMessage m : incomming) {
View Full Code Here

Examples of de.nameless.gameEngine.system.lan.messages.NEMessage

   */
  public void arrangeTurn(NEplayer player) {
    debug("Asking " + player.getName() + " for his doing...",false);
    boolean endOfTuren = false;
    while (!endOfTuren) {
      NEMessage m = player.sendAndWait(new NEYourTurnMessage(), NEMessage.TRANSAKTION);
      NETransaktionMessage transMessage = (NETransaktionMessage) m;
     
      if (transMessage.getContent() instanceof NEEndOfTurnTransaktion) {
        endOfTuren = true;       
      } else {
View Full Code Here

Examples of de.nameless.gameEngine.system.lan.messages.NEMessage

 
  /**
   * Client waits until
   */
  public void waitForGame(){
    NEMessage m = lan.waitOnNextMessage(NEMessage.WORLD);   
    gameServer.fromMassage((NEWorldMessage)m)
    gameServer.flushAllGFX()
    clientGameLoop = new NEClientGameLoop(this, lan);
  }
View Full Code Here

Examples of de.nameless.gameEngine.system.lan.messages.NEMessage

  }

  @Override
  public void doJob() {
    while(gameRunning){
      NEMessage m = lan.waitOnNextMessage();     
      switch(m.getTyp()){
        case NEMessage.YOURTURN:     
          holder.StartTurn();
        break;
        case NEMessage.TRANSAKTION:         
          holder.DoTransaction((NETransaktionMessage)m);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.