de.fhwiesbaden.jgamp001.thello
Class AbstractRegularGame<M>

java.lang.Object
  extended by de.fhwiesbaden.jgamp001.thello.AbstractRegularGame<M>
All Implemented Interfaces:
Game<M>, PerfectInformationGame<M>, RegularGame<M>, java.lang.Cloneable
Direct Known Subclasses:
ThelloGame

public abstract class AbstractRegularGame<M>
extends java.lang.Object
implements RegularGame<M>, PerfectInformationGame<M>, java.lang.Cloneable


Field Summary
 java.lang.Integer movesDone
           
 
Constructor Summary
AbstractRegularGame(byte c, byte r)
           
 
Method Summary
 AbstractRegularGame<M> clone()
           
 byte currentPlayer()
           
 boolean ended()
           
 byte getAtPosition(byte column, byte row)
           
 int getColumns()
           
 byte getPlayerNone()
           
 byte getPlayerOne()
           
 byte getPlayerTwo()
           
 int getRows()
           
abstract  java.lang.Boolean isLegalMove(M move)
           
 byte lastPlayer()
           
 byte nextPlayer()
           
 byte otherPlayer(byte p)
           
abstract  AbstractRegularGame<M> setAtPosition(byte column, byte row)
           
 boolean wins()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.fhwiesbaden.jgamp001.thello.Game
doMove, evalState, getMovesDone, moves, noMoreMove, wins
 
Methods inherited from interface de.fhwiesbaden.jgamp001.thello.PerfectInformationGame
getSteineEins, getSteineZwei
 

Field Detail

movesDone

public java.lang.Integer movesDone
Constructor Detail

AbstractRegularGame

public AbstractRegularGame(byte c,
                           byte r)
Method Detail

getPlayerOne

public byte getPlayerOne()
Specified by:
getPlayerOne in interface RegularGame<M>

getPlayerTwo

public byte getPlayerTwo()
Specified by:
getPlayerTwo in interface RegularGame<M>

getPlayerNone

public byte getPlayerNone()
Specified by:
getPlayerNone in interface RegularGame<M>

currentPlayer

public byte currentPlayer()
Specified by:
currentPlayer in interface Game<M>

otherPlayer

public byte otherPlayer(byte p)
Specified by:
otherPlayer in interface Game<M>

nextPlayer

public byte nextPlayer()

lastPlayer

public byte lastPlayer()

getRows

public int getRows()
Specified by:
getRows in interface RegularGame<M>

getColumns

public int getColumns()
Specified by:
getColumns in interface RegularGame<M>

isLegalMove

public abstract java.lang.Boolean isLegalMove(M move)
Specified by:
isLegalMove in interface PerfectInformationGame<M>
Specified by:
isLegalMove in interface RegularGame<M>

setAtPosition

public abstract AbstractRegularGame<M> setAtPosition(byte column,
                                                     byte row)
Specified by:
setAtPosition in interface RegularGame<M>

getAtPosition

public byte getAtPosition(byte column,
                          byte row)
Specified by:
getAtPosition in interface RegularGame<M>

wins

public boolean wins()

ended

public boolean ended()
Specified by:
ended in interface Game<M>

clone

public AbstractRegularGame<M> clone()
Overrides:
clone in class java.lang.Object