|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.freecol.common.model.Turn
public class Turn
Represents a given turn in the game.
| Nested Class Summary | |
|---|---|
static class |
Turn.Season
|
| Field Summary | |
|---|---|
private static int[] |
ages
The first years of the "ages" of the game, which are only used for weighting FoundingFathers. |
private static int |
seasonYear
The first year in which there are two seasons. |
private static int |
startingYear
The year in which the game starts. |
private int |
turn
The numerical value of the Turn, never less than one. |
| Constructor Summary | |
|---|---|
Turn(int turn)
Creates a new Turn instance. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
Checks if this turn is equal to another turn. |
int |
getAge()
Describe getAge method here. |
static int |
getAge(int year)
Describe getAge method here. |
static int[] |
getAges()
Get the Ages value. |
StringTemplate |
getLabel()
Describe getLabel method here. |
static StringTemplate |
getLabel(int turn)
Describe getLabel method here. |
int |
getNumber()
Gets the turn number. |
Turn.Season |
getSeason()
Return the Season of this Turn. |
static Turn.Season |
getSeason(int turn)
Return the Season of the given Turn number. |
static int |
getSeasonYear()
Get the SeasonYear value. |
static int |
getStartingYear()
Get the StartingYear value. |
int |
getYear()
Gets the year this turn is in. |
static int |
getYear(int turn)
Gets the year the given turn is in. |
boolean |
isFirstSeasonTurn()
Describe isFirstSeasonTurn method here. |
Turn |
next()
Increases the turn number by one. |
static void |
setAges(int[] newAges)
Set the Ages value. |
static void |
setSeasonYear(int newSeasonYear)
Set the SeasonYear value. |
static void |
setStartingYear(int newStartingYear)
Set the StartingYear value. |
java.lang.String |
toString()
Returns a string representation of this turn. |
static java.lang.String |
toString(int turn)
Returns a non-localized string representation of the given turn. |
static int |
yearToTurn(int year)
Describe yearToTurn method here. |
static int |
yearToTurn(int year,
Turn.Season season)
Describe yearToTurn method here. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private int turn
private static int startingYear
private static int seasonYear
private static int[] ages
FoundingFathers.
| Constructor Detail |
|---|
public Turn(int turn)
Turn instance.
turn - an int value| Method Detail |
|---|
public static int yearToTurn(int year)
yearToTurn method here.
year - an int value
int value
public static int yearToTurn(int year,
Turn.Season season)
yearToTurn method here.
year - an int valueseason - a Season value
int valuepublic Turn next()
public int getNumber()
public int getAge()
getAge method here.
int valuepublic static int getAge(int year)
getAge method here.
year - an int value
int valuepublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic static int getYear(int turn)
public int getYear()
public java.lang.String toString()
toString in class java.lang.Objectpublic static java.lang.String toString(int turn)
public static Turn.Season getSeason(int turn)
turn - The turn number to calculate from.
public Turn.Season getSeason()
Season valuepublic StringTemplate getLabel()
getLabel method here.
StringTemplate valuepublic static StringTemplate getLabel(int turn)
getLabel method here.
turn - an int value
StringTemplate valuepublic static final int getStartingYear()
StartingYear value.
int valuepublic static final void setStartingYear(int newStartingYear)
StartingYear value.
newStartingYear - The new StartingYear value.public static final int getSeasonYear()
SeasonYear value.
int valuepublic static final void setSeasonYear(int newSeasonYear)
SeasonYear value.
newSeasonYear - The new SeasonYear value.public boolean isFirstSeasonTurn()
isFirstSeasonTurn method here.
boolean valuepublic static final int[] getAges()
Ages value.
int[] valuepublic static final void setAges(int[] newAges)
Ages value.
newAges - The new Ages value.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||