soc.client
Class SOCPlayerInterface.SOCPIDiscardOrPickMsgTask

java.lang.Object
  extended by java.util.TimerTask
      extended by soc.client.SOCPlayerInterface.SOCPIDiscardOrPickMsgTask
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
SOCPlayerInterface

private static class SOCPlayerInterface.SOCPIDiscardOrPickMsgTask
extends java.util.TimerTask

When timer fires, show discard message or picking-resource message for any other player (not client player) who must discard or pick.

Since:
1.1.00
Author:
jdmonin
See Also:
SOCPlayerInterface.discardOrPickTimerSet(boolean)

Field Summary
private  boolean isDiscard
           
private  SOCPlayerInterface pi
           
 
Constructor Summary
SOCPlayerInterface.SOCPIDiscardOrPickMsgTask(SOCPlayerInterface spi, boolean forDiscard)
          Create a new SOCPIDiscardOrPickMsgTask.
 
Method Summary
 void run()
          Called when timer fires.
 
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pi

private SOCPlayerInterface pi

isDiscard

private final boolean isDiscard
Constructor Detail

SOCPlayerInterface.SOCPIDiscardOrPickMsgTask

public SOCPlayerInterface.SOCPIDiscardOrPickMsgTask(SOCPlayerInterface spi,
                                                    boolean forDiscard)
Create a new SOCPIDiscardOrPickMsgTask. After creating, you must schedule it with SOCPlayerClient.GameAwtDisplay.getEventTimer().schedule(msgTask,delay) .

Parameters:
spi - Our player interface
forDiscard - True for discard, false for picking gold-hex resources
Method Detail

run

public void run()
Called when timer fires. Examine game state and players. Sets "discarding..." or "picking..." at handpanels of discarding players.

Specified by:
run in interface java.lang.Runnable
Specified by:
run in class java.util.TimerTask