Package com.starpoints.state
Class LeagueState
- java.lang.Object
-
- com.starpoints.state.LeagueState
-
- All Implemented Interfaces:
java.io.Serializable
public class LeagueState extends java.lang.Object implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LeagueState()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLeaguePlayer(int id, FigureState leaguePlayer)
int
getFigureRank(FigureState f)
Returns the rank in the current season of the given figure f.LeagueGameMode
getLeagueGameMode()
FigureState
getLeaguePlayerForId(int playerID)
java.util.List<FigureState>
getLeaguePlayers()
Returns the list of league players sorted by current ranking, first in league board first.java.util.Map<java.lang.Integer,LeagueResult>
getLeagueResults()
int
getMatchdayIndex()
int
getMatchIndex()
Season
getSeason()
java.util.List<LeagueResult>
getSortedLeagueResults()
Returns the list of league results sorted by current ranking, first in league board first.void
setLeagueGameMode(LeagueGameMode leagueGameMode)
void
setLeagueResults(java.util.Map<java.lang.Integer,LeagueResult> leagueResults)
void
setMatchdayIndex(int matchdayIndex)
void
setMatchIndex(int matchIndex)
void
setSeason(Season season)
-
-
-
Method Detail
-
getSeason
public Season getSeason()
- Returns:
- the season
-
setSeason
public void setSeason(Season season)
- Parameters:
season
- the season to set
-
getLeagueResults
public java.util.Map<java.lang.Integer,LeagueResult> getLeagueResults()
- Returns:
- the leagueResults
-
setLeagueResults
public void setLeagueResults(java.util.Map<java.lang.Integer,LeagueResult> leagueResults)
- Parameters:
leagueResults
- the leagueResults to set
-
getMatchIndex
public int getMatchIndex()
- Returns:
- the matchIndex
-
setMatchIndex
public void setMatchIndex(int matchIndex)
- Parameters:
matchIndex
- the matchIndex to set
-
getLeagueGameMode
public LeagueGameMode getLeagueGameMode()
- Returns:
- the leagueGameMode
-
setLeagueGameMode
public void setLeagueGameMode(LeagueGameMode leagueGameMode)
- Parameters:
leagueGameMode
- the leagueGameMode to set
-
getMatchdayIndex
public int getMatchdayIndex()
- Returns:
- the matchdayIndex
-
setMatchdayIndex
public void setMatchdayIndex(int matchdayIndex)
- Parameters:
matchdayIndex
- the matchdayIndex to set
-
getLeaguePlayers
public java.util.List<FigureState> getLeaguePlayers()
Returns the list of league players sorted by current ranking, first in league board first.- Returns:
- the leaguePlayers
-
getSortedLeagueResults
public java.util.List<LeagueResult> getSortedLeagueResults()
Returns the list of league results sorted by current ranking, first in league board first.- Returns:
- the leaguePlayers
-
getFigureRank
public int getFigureRank(FigureState f)
Returns the rank in the current season of the given figure f.- Returns:
- The figures rank, 0 for the leading figure.
-
addLeaguePlayer
public void addLeaguePlayer(int id, FigureState leaguePlayer)
- Parameters:
i
-leaguePlayers
- the leaguePlayers to set
-
getLeaguePlayerForId
public FigureState getLeaguePlayerForId(int playerID)
-
-