ctf.view
Interface GameInterface


public interface GameInterface

This interface is used as a wrapper around the model, for the sake of the View.


Nested Class Summary
static interface GameInterface.PlayerInfo
          Contains player information relevant to the View
static class GameInterface.Side
          Sides of the field
 
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(GameInterface.Side s)
          Position of a team's flag
 java.awt.geom.RectangularShape jail(GameInterface.Side side)
          The size of each jail (in metres)
 java.util.Collection<GameInterface.PlayerInfo> playerInfo(GameInterface.Side s)
          Position, orientation for all players on a team
 double playerRadius()
          The radius of each player (in metres)
 int score(GameInterface.Side s)
          What's the given team's score?
 java.lang.String statusMessage()
          A status message: any information the Model would like to convey
 java.awt.Color teamColor(GameInterface.Side s)
          What is the given team's colour?
 boolean teamsConnected()
          Have both teams connected (and identified their 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(GameInterface.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


teamsConnected

boolean teamsConnected()
Have both teams connected (and identified their colour)?


clock

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


teamColor

java.awt.Color teamColor(GameInterface.Side s)
What is the given team's colour?


score

int score(GameInterface.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(GameInterface.Side s)
Position of a team's flag


playerInfo

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