de.fhwiesbaden.jgamp001.thello
Class AbstractRegularGame<M>
java.lang.Object
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
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
movesDone
public java.lang.Integer movesDone
AbstractRegularGame
public AbstractRegularGame(byte c,
byte r)
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