Package org.seattlegamer.spacegame.core

Examples of org.seattlegamer.spacegame.core.GameLauncher


    return new MenuState(bus(), resourceCache());
  }
 
  public @Bean GameLauncher gameLauncher() {
    Bus bus = bus();
    GameLauncher gameLauncher = new GameLauncher(bus(), gameState());
    bus.register(gameLauncher, null);
    return gameLauncher;
  }
View Full Code Here


      @Override public void putImage(String name, Object asset) {}
      @Override public Image getImage(String name) throws IOException { return null; }
    };
    DisplayMode displayMode = new DisplayMode(800, 600, 16, 60);
    MockGameState gameState = new MockGameState(bus, resourceCache, displayMode);
    GameLauncher launcher = new GameLauncher(bus, gameState);
   
    Collection<String> players = new LinkedList<String>();
    players.add("Bob");
    players.add("Joe");
   
    NewGameManifest manifest = new NewGameManifest();
    for(String player : players) {
      manifest.getPlayers().add(player);
    }
   
    launcher.startNewGame(manifest);
   
    Collection<String> gameStatePlayers = gameState.getPlayers();

    for(String player : players) {
      assertTrue(gameStatePlayers.contains(player));
View Full Code Here

TOP

Related Classes of org.seattlegamer.spacegame.core.GameLauncher

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.