|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ISimulatorView
An interface used to represent the game state to the simulator view object(s).
An acceptable simulator model implementation must contain a class called SMfacade that
public SMfacade()
.
Field Summary | |
---|---|
static double |
BALL_RADIUS
The radius of the ball in metres. |
static double |
FIELD_LENGTH
The length (x-axis) of the field in metres. |
static double |
FIELD_WIDTH
The width (y-axis) of the field in metres. |
static double |
GOAL_WIDTH
The width of the goal. |
static int |
NUMBER_OF_PLAYERS
The number of players per team |
static double |
PLAYER_RADIUS
The radius of each player in metres. |
Method Summary | |
---|---|
CartesianVect |
getBallPosition()
|
PolarVect |
getBallVelocity()
|
Student |
getFieldName()
Which simulator is the host. |
ISimulatorNet |
getISimulatorNet()
Get the object that implements the ISimulatorNet interface. |
CartesianVect |
getPlayerPosition(Side t,
int p)
The position of a particular player. |
PolarVect |
getPlayerVelocity(Side t,
int p)
The orientation of a particular player. |
java.lang.String |
getStatusMessage()
The last status message. |
Student |
getTeamName(Side t)
The name of each team. |
int |
getTeamScore(Side t)
The number of goals scored by each team. |
int |
getTime()
The number of milliseconds played. |
boolean |
isGameInProgress()
|
boolean |
isPlayerInGame(Side t,
int p)
Is the player in play |
void |
setTestMode(boolean m)
Set the model into 'test mode' or not. |
Field Detail |
---|
static final double FIELD_LENGTH
static final double FIELD_WIDTH
static final int NUMBER_OF_PLAYERS
static final double GOAL_WIDTH
static final double BALL_RADIUS
static final double PLAYER_RADIUS
Method Detail |
---|
ISimulatorNet getISimulatorNet()
void setTestMode(boolean m)
m
- true to set the model in test mode, false for normal play modeStudent getFieldName()
java.lang.String getStatusMessage()
boolean isGameInProgress()
Student getTeamName(Side t)
Precondition: isGameInProgress()
t
- The team, 0 or 1.int getTeamScore(Side t)
Precondition: isGameInProgress()
t
- The team, 0 or 1.int getTime()
Precondition: isGameInProgress()
CartesianVect getPlayerPosition(Side t, int p)
Precondition: isGameInProgress()
t
- The team, 0 or 1.p
- The player: 0 less than or equal p, p less than number_of_players()PolarVect getPlayerVelocity(Side t, int p)
Precondition: isGameInProgress()
t
- The team, 0 or 1.p
- The player: 0 less than or equal p, p less than NUMBER_OF_PLAYERS()boolean isPlayerInGame(Side t, int p)
t
- team sidep
- player. 0 less than or equal p, p less than number_of_players()
CartesianVect getBallPosition()
PolarVect getBallVelocity()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |