Class PlayerSkills

java.lang.Object
  |
  +--PrintSuperClass
        |
        +--PlayerSkills
Direct Known Subclasses:
VitalStatistics

public abstract class PlayerSkills
extends PrintSuperClass

Performance rating is set by battleship simulator right after singleUserTest Mode

Parent super-class of VitalStatistics, maintains statistics on Player Skills


Constructor Summary
PlayerSkills()
          set to true when VitalStatistics are set you may only set variables realName, alterEgo, mission once
 
Method Summary
 double getAverageMoves()
          returns average Moves used in last singleUserTestMode
 long getBadMoves()
          returns total number of bad Moves or guesses for all games in singleUserTestMode
 int getBestMoves()
          Returns number of moves for best game in singleUserTestMode
 double getCoverage()
          returns coverage as board percentage
 long getLoss()
          returns number of Losses
 int getMoves()
          Returns count of current number of moves in Current Game
 double getPerformance()
          returns most recent performance level
 PerformanceRating getSkill()
           
 long getTimeLog()
          returns current sum of times
 long getTotalMoves()
          returns total number of Moves in a series
 long getWin()
          returns number of Victories
 int getWorstMoves()
          Returns moves representing worst SingleUserTestMode game
 void print(java.io.PrintWriter pw)
          prints out vitalStatistics string variables
 double probability(int moves)
           
 void setSkill(Message msg, PerformanceRating s)
          sets current skill level can be set more than once but only Battleship$PlayerType may set this Variable also, this method cannot be overridden in a higher level class
 
Methods inherited from class PrintSuperClass
print, print, print, println, println, println, println
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlayerSkills

public PlayerSkills()
set to true when VitalStatistics are set you may only set variables realName, alterEgo, mission once
Method Detail

setSkill

public final void setSkill(Message msg,
                           PerformanceRating s)
sets current skill level can be set more than once but only Battleship$PlayerType may set this Variable also, this method cannot be overridden in a higher level class

getSkill

public final PerformanceRating getSkill()
Returns:
returns a clone of performance rating skill

probability

public final double probability(int moves)
Parameters:
moves - is the number of moves used
Returns:
probability of player solving game using the specified number of moves

getMoves

public final int getMoves()
Returns count of current number of moves in Current Game

getWorstMoves

public final int getWorstMoves()
Returns moves representing worst SingleUserTestMode game

getBestMoves

public final int getBestMoves()
Returns number of moves for best game in singleUserTestMode

getBadMoves

public final long getBadMoves()
returns total number of bad Moves or guesses for all games in singleUserTestMode

getWin

public final long getWin()
returns number of Victories

getLoss

public final long getLoss()
returns number of Losses

getTotalMoves

public final long getTotalMoves()
returns total number of Moves in a series

getAverageMoves

public final double getAverageMoves()
returns average Moves used in last singleUserTestMode

getCoverage

public final double getCoverage()
returns coverage as board percentage

getPerformance

public final double getPerformance()
returns most recent performance level

getTimeLog

public final long getTimeLog()
returns current sum of times

print

public void print(java.io.PrintWriter pw)
prints out vitalStatistics string variables
Overrides:
print in class PrintSuperClass