edu.rice.comp440.driver
Class SwingDriver.SwingHumanPlayer

java.lang.Object
  |
  +--edu.rice.comp440.driver.SwingDriver.SwingHumanPlayer
Enclosing class:
SwingDriver

protected class SwingDriver.SwingHumanPlayer
extends java.lang.Object
implements Player


Constructor Summary
protected SwingDriver.SwingHumanPlayer()
           
 
Method Summary
 void lost()
          Upcall to indicate that this player has lost the current game
 Move move(Backgammon backgammon)
          Requests that the player make a move using the given backgammon setup.
 void moveDone()
           
 void won()
          Upcall to indicate that this player has won the current game
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwingDriver.SwingHumanPlayer

protected SwingDriver.SwingHumanPlayer()
Method Detail

move

public Move move(Backgammon backgammon)
Description copied from interface: Player
Requests that the player make a move using the given backgammon setup. The player should return a valid and complete move. The list of valid moves can be found by calling backgammon.getAllMoves().
Specified by:
move in interface Player
Tags copied from interface: Player
Parameters:
backgammon - The current backgammon situation

moveDone

public void moveDone()

won

public void won()
Description copied from interface: Player
Upcall to indicate that this player has won the current game
Specified by:
won in interface Player

lost

public void lost()
Description copied from interface: Player
Upcall to indicate that this player has lost the current game
Specified by:
lost in interface Player