Class Player

java.lang.Object
  |
  +--PrintSuperClass
        |
        +--PlayerSkills
              |
              +--VitalStatistics
                    |
                    +--Player
Direct Known Subclasses:
PlayerDJB, PlayerGM, PlayerGM1, PlayerTMD0, PlayerTMD1, PlayerTMD2, PlayerTMD3, PlayerTMD4

public abstract class Player
extends VitalStatistics

parent class of all players, requires user to implement makeMove

abstract protected boolean fileStat( Message )
Programmer must implement disk file to save stats - version 2
deprecated 
abstract protected void placeShips(  ) - make this a private method
Programmer must place ships, and return board with ships 
abstract public Move makeMove( Message msg, Board brd )
Programmer must read msg, is passed board with players current guesses

Note we have implemented a message passing system with authenication Advantages: only one public method inside children of player

however, another alternative object oriented approach is to force children of Player to implement all functions that will be called. This method will require each method to do verification checks. this method would also have to inform player child to make methods final,


Constructor Summary
Player()
           
 
Method Summary
abstract  Coordinates makeMove(Message msg, Board brd)
          Abstract methods must be declared in all sub-class children
 
Methods inherited from class VitalStatistics
getAlterEgo, getMission, getRealName, print, println, setComments, setVitalStatistics
 
Methods inherited from class PlayerSkills
getAverageMoves, getBadMoves, getBestMoves, getCoverage, getLoss, getMoves, getPerformance, getSkill, getTimeLog, getTotalMoves, getWin, getWorstMoves, probability, setSkill
 
Methods inherited from class PrintSuperClass
print, print, print, println, println, println
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Player

public Player()
Method Detail

makeMove

public abstract Coordinates makeMove(Message msg,
                                     Board brd)
Abstract methods must be declared in all sub-class children