Class SeriesRating
java.lang.Object
|
+--PrintSuperClass
|
+--SeriesRating
- public class SeriesRating
- extends PrintSuperClass
Link List Keeps Track of HeadToHead Combat Wins, Loss, Players
Each node link has the following fields:
winner, loser,
win - number of games winner won;
loss - number of games winner lost
avgMoves - number of average moves to solve each game in series
coverage - amount of board covered before a victory
Note this class has only one static head pointer.
Only Battleship$PlayerType may add link.
Anyone can access the entire sequence by using static method...
SeriesRating myHead = SeriesRating.getHead( );
May implement enumeration and DSA Key Security, however DSA key creation is slow.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SeriesRating
public SeriesRating(double key,
Player won,
Player lost,
long gamesWon,
long numGames,
long numMoves)
getWinner
public Player getWinner()
getLoser
public Player getLoser()
getVictories
public long getVictories()
getLosses
public long getLosses()
getLink
public SeriesRating getLink()
getHead
public static SeriesRating getHead()
getAverageMoves
public double getAverageMoves()
getCoverage
public double getCoverage()
print
public void print(java.io.PrintWriter pw)
- Overrides:
print in class PrintSuperClass
println
public void println(java.io.PrintWriter pw)
- Overrides:
println in class PrintSuperClass