ictk.boardgame.chess
Class ChessTeam
java.lang.Object
ictk.boardgame.Player
ictk.boardgame.chess.ChessPlayer
ictk.boardgame.chess.ChessTeam
- All Implemented Interfaces:
- Team
- public class ChessTeam
- extends ChessPlayer
- implements Team
A ChessPlayer that involves several members, possibly playing as a
team in one game.
Method Summary |
java.util.List |
getPlayers()
returns the List of players that are on this team. |
int |
getRating()
returns an average rating for the team if and only if all players
have ratings or the rating has explicitly been set to non-zero. |
java.lang.String |
getTeamName()
|
void |
setTeamName(java.lang.String name)
|
java.lang.String |
toString()
diagonostic function. |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
ChessTeam
public ChessTeam()
ChessTeam
public ChessTeam(java.lang.String n)
getTeamName
public java.lang.String getTeamName()
- Specified by:
getTeamName
in interface Team
setTeamName
public void setTeamName(java.lang.String name)
- Specified by:
setTeamName
in interface Team
getPlayers
public java.util.List getPlayers()
- returns the List of players that are on this team. This will
never be null.
NOTE: if you add anything other than ChessPlayers it will
break certain methods.
- Specified by:
getPlayers
in interface Team
getRating
public int getRating()
- returns an average rating for the team if and only if all players
have ratings or the rating has explicitly been set to non-zero.
- Overrides:
getRating
in class ChessPlayer
toString
public java.lang.String toString()
- diagonostic function.
- Overrides:
toString
in class ChessPlayer