robocraft.common
Class Team

java.lang.Object
  extended byrobocraft.common.CommonEnum
      extended byrobocraft.common.Team

public class Team
extends robocraft.common.CommonEnum

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 energon cubes 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()

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
          The Team assigned to energon cubes.
 
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
The Team assigned to energon cubes.

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.