erland.game.tileadventure
Interface TileAdventureModelInterface

All Known Implementing Classes:
TileAdventureModelStandalone

public interface TileAdventureModelInterface

Defines all methods needed for a game model for the game


Method Summary
 String getInfoString()
          Get an information string from the model
 MapDrawInterface getMap()
          Get the active map
 int getNoOfHumanPlayers()
          Get number of human controlled players
 GameObject getPlayerObject()
          Get the player object
 void init(GameEnvironmentInterface environment, IrregularBlockContainerInterface cont)
          Initialize model
 boolean isCompleted()
          Check if game has been completed
 boolean isEnd()
          Check if game has ended
 boolean isGameOver()
          Check if it is game over
 boolean isInitialized()
          Check if game has been initialized
 boolean isMultiplayer()
          Check if this is a multi player game
 boolean isStarted()
          Check if game has been started
 void jump()
          Jump
 void setCheatModeParameter(String parameter, String value)
          Set a cheat parameter
 void start()
          Start the game
 void startMoveDown()
          Begin moving down
 void startMoveLeft()
          Begin moving left
 void startMoveRight()
          Begin moving right
 void startMoveUp()
          Begin moving up
 void stopMoveDown()
          Stop moving down
 void stopMoveLeft()
          Stop moveing left
 void stopMoveRight()
          Stop moving right
 void stopMoveUp()
          Stop moving up
 void update()
          Update model
 

Method Detail

startMoveLeft

void startMoveLeft()
Begin moving left


startMoveRight

void startMoveRight()
Begin moving right


startMoveUp

void startMoveUp()
Begin moving up


startMoveDown

void startMoveDown()
Begin moving down


stopMoveLeft

void stopMoveLeft()
Stop moveing left


stopMoveRight

void stopMoveRight()
Stop moving right


stopMoveUp

void stopMoveUp()
Stop moving up


stopMoveDown

void stopMoveDown()
Stop moving down


jump

void jump()
Jump


init

void init(GameEnvironmentInterface environment,
          IrregularBlockContainerInterface cont)
Initialize model

Parameters:
environment - Game environment object
cont - Block container for the game area

start

void start()
Start the game


update

void update()
Update model


getMap

MapDrawInterface getMap()
Get the active map


getPlayerObject

GameObject getPlayerObject()
Get the player object


getNoOfHumanPlayers

int getNoOfHumanPlayers()
Get number of human controlled players

Returns:
Number of human contolled players

isEnd

boolean isEnd()
Check if game has ended

Returns:
true if game has ended

isGameOver

boolean isGameOver()
Check if it is game over

Returns:
true if it is game over

isCompleted

boolean isCompleted()
Check if game has been completed

Returns:
true if game has been completed

isStarted

boolean isStarted()
Check if game has been started

Returns:
true if game has been started

isInitialized

boolean isInitialized()
Check if game has been initialized

Returns:
true if game has been initialized

isMultiplayer

boolean isMultiplayer()
Check if this is a multi player game

Returns:
true if multi player

getInfoString

String getInfoString()
Get an information string from the model

Returns:
The information string

setCheatModeParameter

void setCheatModeParameter(String parameter,
                           String value)
Set a cheat parameter

Parameters:
parameter - Cheat parameter name
value - Cheat parameter value


Copyright © 2003-2006 Erland Isaksson. All Rights Reserved.