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.


Nested Class Summary
static class Player.GameStatus
          This enum is used by the gameStatus method.
static class Player.PanelLoc
          This enum specifies the different panel locations that the player will be asked to set up.
 
Method Summary
 Player.GameStatus gameStatus()
          Returns one of the three constants above telling what the status of the game is.
 java.awt.Container getGameStatusPanel(Player.PanelLoc 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
 

Method Detail

gameStatus

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


getGameStatusPanel

java.awt.Container getGameStatusPanel(Player.PanelLoc 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 PanelLoc constants such as NORTH;

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.