pictionary
Class PictionaryGame.EndDrawTask

java.lang.Object
  extended by java.util.TimerTask
      extended by pictionary.PictionaryGame.EndDrawTask
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
PictionaryGame

private class PictionaryGame.EndDrawTask
extends java.util.TimerTask

A simple class, overriding TimerTask.run(), used when scheduling the game's next action, created when a player starts drawing.


Constructor Summary
private PictionaryGame.EndDrawTask()
           
 
Method Summary
 void run()
          Calls PictionaryGame.nextAction() if we aren't supposed to skip it; sometimes a player's draw turn is interrupted and PictionaryGame.nextAction() is called when a guessing player makes a correct guess, but the timer is still ticking and we want to avoid calling PictionaryGame.nextAction() an extra time.
 
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
 

Constructor Detail

PictionaryGame.EndDrawTask

private PictionaryGame.EndDrawTask()
Method Detail

run

public void run()
Calls PictionaryGame.nextAction() if we aren't supposed to skip it; sometimes a player's draw turn is interrupted and PictionaryGame.nextAction() is called when a guessing player makes a correct guess, but the timer is still ticking and we want to avoid calling PictionaryGame.nextAction() an extra time.

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