*
* @throws FactoryException If parsing fails. Should not happen.
*/
@Test
public void testFullMap() throws FactoryException {
Game g = parser.parseMap(map);
Board b = g.getBoard();
// did we recognize the right sprites?
assertEquals(SpriteType.EMPTY, b.spriteTypeAt(1, 3));
assertEquals(SpriteType.PLAYER, b.spriteTypeAt(2, 2));
assertEquals(SpriteType.GHOST, b.spriteTypeAt(1, 2));
assertEquals(SpriteType.WALL, b.spriteTypeAt(0, 0));
assertEquals(SpriteType.FOOD, b.spriteTypeAt(1, 1));
// did we properly set the player?
assertEquals(g.getPlayer(), b.spriteAt(2, 2));
// were all ghosts added?
assertEquals(2, g.getGhosts().size());
// was the food actually added?
final int cellsWithFoodCount = 3;
assertEquals(cellsWithFoodCount * Food.DEFAULT_POINTS,
g.getPointManager().totalFoodInGame());
}