ctf.view
Interface GameViewInterface

All Known Implementing Classes:
FieldViewTester

public interface GameViewInterface

This interface is used as a wrapper around the model, for the View's sake. Note: You may return null from trees(), flagPosition() and playerInfo() (e.g. if the teams haven't connected yet).


Nested Class Summary
static interface GameViewInterface.PlayerInfo
          Contains player information relevant to the View
 
Method Summary
 int clock()
          How long the game has been going on (in seconds)
 java.awt.geom.RectangularShape fieldSize()
          The size of the field (in metres)
 java.awt.geom.Point2D flagPosition(Side s)
          Position of a team's flag
 java.awt.geom.RectangularShape jail(Side side)
          The size of each jail (in metres)
 java.util.Collection<GameViewInterface.PlayerInfo> playerInfo(Side s)
          Position, orientation for all players on a team
 double playerRadius()
          The radius of each player (in metres)
 int score(Side s)
          What's the given team's score?
 java.lang.String statusMessage()
          A status message: any information the Model would like to convey
 TeamColor teamColor(Side s)
          What is the given team's colour?
 double treeRadius()
          The radius of each tree (in metres)
 java.util.Collection<java.awt.geom.Point2D> trees()
          Positions of all trees
 

Method Detail

fieldSize

java.awt.geom.RectangularShape fieldSize()
The size of the field (in metres)


jail

java.awt.geom.RectangularShape jail(Side side)
The size of each jail (in metres)


playerRadius

double playerRadius()
The radius of each player (in metres)


treeRadius

double treeRadius()
The radius of each tree (in metres)


statusMessage

java.lang.String statusMessage()
A status message: any information the Model would like to convey


clock

int clock()
How long the game has been going on (in seconds)


teamColor

TeamColor teamColor(Side s)
What is the given team's colour?


score

int score(Side s)
What's the given team's score?


trees

java.util.Collection<java.awt.geom.Point2D> trees()
Positions of all trees


flagPosition

java.awt.geom.Point2D flagPosition(Side s)
Position of a team's flag


playerInfo

java.util.Collection<GameViewInterface.PlayerInfo> playerInfo(Side s)
Position, orientation for all players on a team