Package org.jgroups.demo.tankwar.model

Examples of org.jgroups.demo.tankwar.model.Tank


  public JMXRegisterTest() {
  }
 
  public static void main(String[] args) throws Exception {
   
    Tank tank = new Tank("myTank", true, true, 100, 100, 100, Direction.LU, Direction.LU, null);
   
    MBeanServer server = JMXUtil.getMBeanServer();

//    JMXUtil.registerTank(tank, server, "TankWar:type=View,name=tank");
   
View Full Code Here


    }
   
    Session session = (Session) msg.getObject();
    TankView view = session.tankView();
    if(view.isLive()){
      Tank tank = tankMap.get(view.getId());
      if(null == tank) {
        tankMap.put(view.getId(), new Tank(view));
      } else {
        tank.updateTank(view);
      }
    } else {
      tankMap.remove(view.getId());
    }
   
View Full Code Here

    String id = comm.getName();
   
    int x = getRandom(GAME_WIDTH - 100);
    int y = getRandom(GAME_HEIGHT - 100);
   
    myTank = new Tank(id, isGood, true, 100, x, y, Direction.STOP, Direction.D, this);
   
    comm.put(id, myTank);   
    comm.replicateTank(myTank.getView());
  }
View Full Code Here

TOP

Related Classes of org.jgroups.demo.tankwar.model.Tank

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.