public interface GameControllerAdapter
Modifier and Type | Method and Description |
---|---|
void |
clearMouse()
This method will be invoked at the end of the game.
|
void |
detonateBomb(Bomb bomb)
This method will be invoked when a mouse crosses a bomb.
|
void |
displayCountDown(int seconds)
This method is to be invoked when showing the number of seconds left to the game end.
|
void |
newBomb(Bomb bomb)
This method will be invoked when a mouse planted a new bomb.
|
void |
newCheese(Cheese newCheese)
This method will be invoked each time the cheese changes location.
|
void |
newMouse(MouseController mouse)
This method will be invoked during game load to introduce new mouse
into the user interface.
|
void |
removeBomb(Bomb bomb)
This method will be invoked when the bomb represent is to be removed.
|
void |
repositionMouse(MouseController mouse,
Grid grid)
This method will be invoked when the mouse represent has to be repositioned.
|
void |
start()
This method will be invoked and adapter has to prepare all necessary preloading and
starts the game.
|
void |
stop()
This method will be invoked and adapter has to cause all represents to halt.
|
void newMouse(MouseController mouse) throws java.io.IOException
mouse
- The new mouse controller that was being loaded.java.io.IOException
- As a new mouse is introduced, the adapter has to create a new represent,
loading the appropriate assets. If the assets required are missing, this method should throw an
IOException.void newCheese(Cheese newCheese)
newCheese
- The cheese instance.void clearMouse()
void newBomb(Bomb bomb) throws java.io.IOException
bomb
- The bomb instance.java.io.IOException
- When the method creates a represent for the new bomb, the
IOException would be thrown if the required assets are missing.void detonateBomb(Bomb bomb) throws java.io.IOException
bomb
- The bomb instance.java.io.IOException
- When the method changes the image of the represent, the
IOException would be thrown if the required assets are missing.void removeBomb(Bomb bomb)
bomb
- The bomb instance.void repositionMouse(MouseController mouse, Grid grid)
mouse
- The mouse to be moved.grid
- The grid that the mouse is to be moved to.void start()
void stop()
void displayCountDown(int seconds)