Package org.jpacman.framework.model

Examples of org.jpacman.framework.model.Food


   * @throws FactoryException Never.
   */
  @Test
  public void testC5_PlayerMovesToFood() throws FactoryException {   
    Game game = makePlay("P.#");
    Food food = (Food) game.getBoard().spriteAt(1, 0);
    Player player = game.getPlayer();

    game.movePlayer(Direction.RIGHT);
   
    Tile newTile = tileAt(game, 1, 0);
    assertEquals("Food added", food.getPoints(), player.getPoints());
    assertEquals("Player moved", newTile.topSprite(), player);
    assertFalse("Food gone", newTile.containsSprite(food));
  }
View Full Code Here


  }

  @Override
  public Food makeFood() {
    assert getGame() != null;
    Food f = new Food();
    getGame().addFood(f);
    return f;
  }
View Full Code Here

TOP

Related Classes of org.jpacman.framework.model.Food

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.