Package pvzclone.model.api
Interface Game
- All Known Implementing Classes:
GameImpl
public interface Game
This interface models a Game.
It represents the core functionality and mechanics of the game.
-
Method Summary
-
Method Details
-
isOver
boolean isOver()Checks if the game is over.- Returns:
- true if the game is over, false otherwise.
-
update
void update(long elapsed) update the whole game.- Parameters:
elapsed
- is the current time
-
createPlant
Create a new plant.- Parameters:
position
- is the position of the new plant- Returns:
- true if the plant is created, else false
-
getGameState
GameState getGameState()Retrieves the current state of the game.- Returns:
- the current state of the game.
-
getEntities
Retrieves the set of entities present in the game. Entities represent the elements in the game world.- Returns:
- a Set of Entities representing the elements in the game world.
-