edu.trinity.cs.gamecore
Interface Player<B extends Block<B,E>,E extends GameEntity<B,E>>

All Superinterfaces:
GameEntity<B,E>, java.io.Serializable
All Known Implementing Classes:
BasicPlayer, EditorPlayer, StickPlayer

public interface Player<B extends Block<B,E>,E extends GameEntity<B,E>>
extends GameEntity<B,E>

This interface will be implemented for any class that should represent a player in the game.

This class is a generic that takes the general block type and the general entity type for each game.


Field Summary
static int EAST_PANEL
           
static int GAME_RUNNING
           
static int GAME_SUCCESS
           
static int NORTH_PANEL
           
static int PLAYER_DEAD
           
static int SOUTH_PANEL
           
static int WEST_PANEL
           
 
Method Summary
 int gameStatus()
          Returns one of the three constants above telling what the status of the game is.
 java.awt.Container getGameStatusPanel(int loc)
          This method returns a GUI container that shows extra information in your game.
 
Methods inherited from interface edu.trinity.cs.gamecore.GameEntity
followLinks, getEditPropertiesPanel, getImage, getLocation, getUpdateTime, partialSizeX, partialSizeY, setLocation, update
 

Field Detail

GAME_RUNNING

static final int GAME_RUNNING
See Also:
Constant Field Values

PLAYER_DEAD

static final int PLAYER_DEAD
See Also:
Constant Field Values

GAME_SUCCESS

static final int GAME_SUCCESS
See Also:
Constant Field Values

NORTH_PANEL

static final int NORTH_PANEL
See Also:
Constant Field Values

EAST_PANEL

static final int EAST_PANEL
See Also:
Constant Field Values

SOUTH_PANEL

static final int SOUTH_PANEL
See Also:
Constant Field Values

WEST_PANEL

static final int WEST_PANEL
See Also:
Constant Field Values
Method Detail

gameStatus

int gameStatus()
Returns one of the three constants above telling what the status of the game is.


getGameStatusPanel

java.awt.Container getGameStatusPanel(int loc)
This method returns a GUI container that shows extra information in your game. For example, this might be where you display the score to the user. I recommend that you use a JPanel here, but it should work with any form of java.awt.Container. This region can be interactive as well if it has elements in it that handle events. In some games this might be where you can select options of things like that. It should return null if nothing is to be displayed. The argument says which area this panel is for. It should be one of the constants such as NORTH_PANEL;

Parameters:
loc - This integer specifies which side of the display the panel is being requested for.
Returns:
The panel that should go at that location or null if none.