robocraft.common
Class Team

java.lang.Object
  extended byrobocraft.common.CommonEnum
      extended byrobocraft.common.Team
All Implemented Interfaces:
java.io.Serializable

public class Team
extends robocraft.common.CommonEnum
implements java.io.Serializable

Every GameObject has a designated team which is one of Team A, Team B, or Neutral. Robots are either on Team A or Team B, and mines are Neutral.

The only instances of this class are those found in the static fields described below. This means that instances can always be meaningfully compared using ==.

See Also:
GameObject.getTeam(), Serialized Form

Field Summary
static Team A
          The Team assigned to robots on Team A.
static Team B
          The Team assigned to robots on Team B.
static Team NEUTRAL
          Neither team.
 
Method Summary
 Team opponent()
          return the oppononent of this team (Team.A opponent is Team.B and vice versa).
 java.lang.String toString()
          Returns one of the three Strings "Team A", "Team B", or "Neutral".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

A

public static final Team A
The Team assigned to robots on Team A.


B

public static final Team B
The Team assigned to robots on Team B.


NEUTRAL

public static final Team NEUTRAL
Neither team.

Method Detail

toString

public java.lang.String toString()
Returns one of the three Strings "Team A", "Team B", or "Neutral".


opponent

public Team opponent()
return the oppononent of this team (Team.A opponent is Team.B and vice versa). The opponent of NEUTRAL is NEUTRAL.