Beispiel #1
0
  private void setupPlayer2() {
    listener2 = mock(EventListener.class);
    player2 = new Player(listener2, game);
    joystick2 = player2.getJoystick();

    dice(hero2.getX(), hero2.getY());

    game.newGame(player2);
    hero2.init(game);
  }
Beispiel #2
0
  private void setupPlayer1() {
    listener1 = mock(EventListener.class);
    player1 = new Player(listener1, game);
    joystick1 = player1.getJoystick();

    dice(hero1.getX(), hero1.getY());

    game.newGame(player1);
    hero1.init(game);
  }
Beispiel #3
0
  private void givenFl(String board) {
    LevelImpl level = new LevelImpl(board);
    Hero hero = level.getHero(charger).get(0);

    game = new Spacerace(level, dice, charger.getBulletsCount());
    listener = mock(EventListener.class);
    player = new Player(listener);
    game.newGame(player);
    player.hero = hero;
    hero.init(game);
    this.hero = game.getHeroes().get(0);
  }