|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjaige.statistics.SeasonStats
public class SeasonStats
This class keeps track of statistics throughout season
The current stats it keeps track of the following for each match:
winner
total moves
total time
Once completed, we can calculate many other statistics based on the data stored here.
wins/losses for each player
wins/losses for each matchup
average moves per win / loss (winner gets odd number)
average move time
quickest / longest win
Copyright: Copyright (c) Jaige 2007
| Constructor Summary | |
|---|---|
SeasonStats()
|
|
| Method Summary | |
|---|---|
java.util.ArrayList<Match> |
getAllMatches()
Returns a copy of the list of matches. |
int[][] |
getLongestWin(java.util.List<? extends AI> ais)
Returns the most number of turns per win for each matchup. |
int[][] |
getMatchupStandings(java.util.List<? extends AI> ais)
The total wins against each player. |
int[][] |
getQuickestWin(java.util.List<? extends AI> ais)
Returns the least number of turns per win for each matchup. |
int[][] |
getStandings(java.util.List<? extends AI> ais)
Returns the total games and total wins per player. |
int[][] |
getTotalMoves(java.util.List<? extends AI> ais)
Returns the total moves per win, loss, and overall. |
int[][] |
getTotalMoveTime(java.util.List<? extends AI> ais)
Gets the total turn time for each win, loss, and game per player. |
boolean |
isPlaying()
Check this to see if any stats are being gathered. |
void |
processGameOverEvent(GameOverEvent event)
|
void |
processMoveEvent(MoveEvent event)
Keeps track of the total move time and the move count. |
void |
processNewGameEvent(NewGameEvent event)
Prepairs the new match for data collection. |
void |
processTurnEvent(TurnEvent event)
Keeps track of the turn as well as the move time. |
void |
reset()
Removes all match data stored in this class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SeasonStats()
| Method Detail |
|---|
public void reset()
public void processMoveEvent(MoveEvent event)
processMoveEvent in interface MoveListenerevent - MoveEventpublic void processNewGameEvent(NewGameEvent event)
processNewGameEvent in interface NewGameListenerevent - NewGameEventpublic void processTurnEvent(TurnEvent event)
processTurnEvent in interface TurnListenerevent - TurnEventpublic boolean isPlaying()
public void processGameOverEvent(GameOverEvent event)
processGameOverEvent in interface GameOverListenerpublic int[][] getStandings(java.util.List<? extends AI> ais)
ais - List of players.
public int[][] getMatchupStandings(java.util.List<? extends AI> ais)
ais - List of players
public int[][] getTotalMoves(java.util.List<? extends AI> ais)
ais - List of players
public int[][] getTotalMoveTime(java.util.List<? extends AI> ais)
ais - List of players
public int[][] getQuickestWin(java.util.List<? extends AI> ais)
ais - List of players
public int[][] getLongestWin(java.util.List<? extends AI> ais)
ais - List of players
public java.util.ArrayList<Match> getAllMatches()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||