Package pvzclone.model.impl
Class GameImpl
java.lang.Object
pvzclone.model.impl.GameImpl
- All Implemented Interfaces:
Game
class that implements the interface Game.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
GameImpl
- Parameters:
world
- is the world.
-
-
Method Details
-
isOver
public boolean isOver()Description copied from interface:Game
Checks if the game is over. -
update
public void update(long elapsed) Description copied from interface:Game
update the whole game. -
createPlant
Description copied from interface:Game
Create a new plant.- Specified by:
createPlant
in interfaceGame
- Parameters:
position
- is the position of the new plant- Returns:
- true if the plant is created, else false
-
getGameState
Description copied from interface:Game
Retrieves the current state of the game.- Specified by:
getGameState
in interfaceGame
- Returns:
- the current state of the game.
-
getEntities
Description copied from interface:Game
Retrieves the set of entities present in the game. Entities represent the elements in the game world.- Specified by:
getEntities
in interfaceGame
- Returns:
- a Set of Entities representing the elements in the game world.
-