Examples of topSprite()


Examples of org.jpacman.framework.model.Tile.topSprite()

    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));
  }

  /**
   * Test what happens if the ghost moves into the player.
View Full Code Here

Examples of org.jpacman.framework.model.Tile.topSprite()

    john.deoccupy();
    Tile north = new Tile(0, 1);
    john.occupy(north);

    // john now lives at north
    assertThat(north.topSprite(), equalTo(john));

    // but john doesn't live in the center anymore.
    assertFalse(center.containsSprite(john));
  }
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.