Examples of parentGame()


Examples of org.menacheri.jetserver.app.impl.GameRoomSession.GameRoomSessionBuilder.parentGame()

  public void sessionDisconnectValidation() throws InterruptedException {
    // create necessary setup objects.
    Game game = new SimpleGame(1, "Test");
    Protocol dummyProtocol = new DummyProtocol();
    GameRoomSessionBuilder sessionBuilder = new GameRoomSessionBuilder();
    sessionBuilder.parentGame(game).gameRoomName("Zombie_ROOM_1")
        .protocol(dummyProtocol);
    CountDownLatch latch = new CountDownLatch(1);
    AtomicLong counter = new AtomicLong(1l);
    Session gameRoomSession = new TestGameRoom(sessionBuilder, counter,
        latch);
View Full Code Here

Examples of org.menacheri.jetserver.app.impl.GameRoomSession.GameRoomSessionBuilder.parentGame()

  public void multiSessionDisconnectValidation() throws InterruptedException {
    // create necessary setup objects.
    Game game = new SimpleGame(1, "Test");
    Protocol dummyProtocol = new DummyProtocol();
    GameRoomSessionBuilder sessionBuilder = new GameRoomSessionBuilder();
    sessionBuilder.parentGame(game).gameRoomName("Zombie_ROOM_1")
        .protocol(dummyProtocol);
    CountDownLatch latch1 = new CountDownLatch(2);
    CountDownLatch latch2 = new CountDownLatch(2);
    AtomicLong counter = new AtomicLong(0l);
    Session gameRoomSession = new TestGameRoom(sessionBuilder, counter,
View Full Code Here

Examples of org.menacheri.jetserver.app.impl.GameRoomSession.GameRoomSessionBuilder.parentGame()

    sessionList = new ArrayList<Session>(NUM_OF_GAME_ROOMS
        * SESSIONS_PER_GAME_ROOM);
    for (int i = 1; i <= NUM_OF_GAME_ROOMS; i++)
    {
      GameRoomSessionBuilder sessionBuilder = new GameRoomSessionBuilder();
      sessionBuilder.parentGame(game).gameRoomName("Zombie_ROOM_" + i)
          .protocol(DUMMY_PROTOCOL);
      Session gameRoomSession = new TestGameRoom(sessionBuilder);
      gameRoomSession.addHandler(new GameRoomSessionHandler(
          gameRoomSession));
      gameRoomList.add((GameRoom) gameRoomSession);
View Full Code Here

Examples of org.menacheri.jetserver.app.impl.GameRoomSession.GameRoomSessionBuilder.parentGame()

    sessionList = new ArrayList<Session>(NUM_OF_GAME_ROOMS
        * SESSIONS_PER_GAME_ROOM);
    for (int i = 1; i <= NUM_OF_GAME_ROOMS; i++)
    {
      GameRoomSessionBuilder sessionBuilder = new GameRoomSessionBuilder();
      sessionBuilder.parentGame(game).gameRoomName("Zombie_ROOM_" + i)
          .protocol(DUMMY_PROTOCOL).eventDispatcher(new ExecutorEventDispatcher());
      Session gameRoomSession = new TestGameRoom(sessionBuilder);
      gameRoomSession.addHandler(new GameRoomSessionHandler(
          gameRoomSession));
      gameRoomList.add((GameRoom) gameRoomSession);
View Full Code Here

Examples of org.menacheri.jetserver.app.impl.GameRoomSession.GameRoomSessionBuilder.parentGame()

  }
 
  public @Bean(name="Zombie_ROOM_1") GameRoom zombieRoom1()
  {
    GameRoomSessionBuilder sessionBuilder = new GameRoomSessionBuilder();
    sessionBuilder.parentGame(zombieGame()).gameRoomName("Zombie_ROOM_1").protocol(messageBufferProtocol);
    ZombieRoom room = new ZombieRoom(sessionBuilder);
    room.setDefender(defender());
    room.setZombie(zombie());
   
    return room;
View Full Code Here

Examples of org.menacheri.jetserver.app.impl.GameRoomSession.GameRoomSessionBuilder.parentGame()

  }
 
  public @Bean(name="Zombie_ROOM_2") GameRoom zombieRoom2()
  {
    GameRoomSessionBuilder sessionBuilder = new GameRoomSessionBuilder();
    sessionBuilder.parentGame(zombieGame()).gameRoomName("Zombie_ROOM_2").protocol(webSocketProtocol);
    ZombieRoom room = new ZombieRoom(sessionBuilder);
    room.setDefender(defender());
    room.setZombie(zombie());
   
    return room;
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.