public class TeamChanged extends GBEvent implements IWorldEvent, IWorldChangeEvent
| Modifier and Type | Field and Description |
|---|---|
protected int |
DesiredTeam
This is the team we wanted to change to (0 for red,1 for
blue, etc..).
|
static String |
PROTOTYPE
Example how the message looks like - used during parser tests.
|
protected boolean |
Success
If true team change was succesfull (it won't be succesfull if
we are changing to a team we already are in).
|
| Constructor and Description |
|---|
TeamChanged()
Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package).
|
TeamChanged(boolean Success,
int DesiredTeam)
Creates new instance of command TeamChanged.
|
TeamChanged(TeamChanged original)
Cloning constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getDesiredTeam()
This is the team we wanted to change to (0 for red,1 for
blue, etc..).
|
long |
getSimTime() |
boolean |
isSuccess()
If true team change was succesfull (it won't be succesfull if
we are changing to a team we already are in).
|
String |
toHtmlString() |
String |
toString() |
getWorldEventtoJsonLiteralpublic static final String PROTOTYPE
protected boolean Success
protected int DesiredTeam
public TeamChanged(boolean Success,
int DesiredTeam)
Success - If true team change was succesfull (it won't be succesfull if
we are changing to a team we already are in).DesiredTeam - This is the team we wanted to change to (0 for red,1 for
blue, etc..).public TeamChanged(TeamChanged original)
public TeamChanged()
public boolean isSuccess()
public int getDesiredTeam()
public long getSimTime()
getSimTime in interface IWorldChangeEventgetSimTime in interface IWorldEventgetSimTime in class GBEventpublic String toString()
toString in class InfoMessagepublic String toHtmlString()
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.