|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fi.utu.cs.hockey.Team
A team.
Field Summary | |
static int |
PLAYERS
Total number of players in a team. |
Fields inherited from interface fi.utu.cs.hockey.Position |
CENTER, GOALKEEPER, LEFT_DEFENSE, LEFT_WING, RIGHT_DEFENSE, RIGHT_WING |
Fields inherited from interface fi.utu.cs.hockey.rink.FaceOff |
CENTER_SPOT, HOME_ENDZONE_LEFT, HOME_ENDZONE_RIGHT, HOME_NEUTRAL_ZONE_LEFT, HOME_NEUTRAL_ZONE_RIGHT, VISITOR_ENDZONE_LEFT, VISITOR_ENDZONE_RIGHT, VISITOR_NEUTRAL_ZONE_LEFT, VISITOR_NEUTRAL_ZONE_RIGHT |
Constructor Summary | |
Team()
Constructs an empty, nameless team. |
Method Summary | |
Player |
addPlayer(int p)
Creates, returns and adds a player to the position p . |
void |
faceoff(int s)
Moves the players of the team to faceoff locations when the faceoff is in the spot s . |
java.lang.String |
getName()
Returns the team's name. |
Player |
getPlayer(int p)
Returns the player of the position p . |
boolean |
isFree(int p)
Returns the whether the position p
is not taken already. |
boolean |
isHome()
Returns true , if this is the home team. |
void |
setName(java.lang.String n)
Sets the team's name to n . |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int PLAYERS
Constructor Detail |
public Team()
Method Detail |
public java.lang.String getName()
public void setName(java.lang.String n)
n
.
public boolean isHome()
true
, if this is the home team.
public Player addPlayer(int p)
p
.
Position
public Player getPlayer(int p)
p
.
public boolean isFree(int p)
p
is not taken already.
public void faceoff(int s)
s
.
FaceOff
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |