bluegammon.gui.animation
Class DicesSelectTurnAnim

java.lang.Object
  extended bybluegammon.gui.animation.Animation
      extended bybluegammon.gui.animation.AbstractDicesAnim
          extended bybluegammon.gui.animation.DicesSelectTurnAnim

public class DicesSelectTurnAnim
extends AbstractDicesAnim

Animation show one black and one white dice, used at start of a game for selecting who should start.

Author:
Peter Andersson

Constructor Summary
DicesSelectTurnAnim(int whiteDice, int blackDice, int width, int height)
          Initiates this animation.
 
Method Summary
 boolean isFinished()
          Probes to check if the animation can be removed
 void onExit()
          Start a new turn for the winning color.
 void onStart()
          Prevent interaction and update gui.
 void paint(javax.microedition.lcdui.Graphics g)
          Draws the animation using the specified graphics context.
 
Methods inherited from class bluegammon.gui.animation.AbstractDicesAnim
getInterval, init, next
 
Methods inherited from class bluegammon.gui.animation.Animation
callNext, getLastInvoke
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DicesSelectTurnAnim

public DicesSelectTurnAnim(int whiteDice,
                           int blackDice,
                           int width,
                           int height)
Initiates this animation.

Parameters:
whiteDice - White dice value, 1 to 6.
blackDice - Black dice value, 1 to 6.
width - Board width.
height - Board height.
Method Detail

onStart

public void onStart()
Prevent interaction and update gui.

Overrides:
onStart in class AbstractDicesAnim

paint

public void paint(javax.microedition.lcdui.Graphics g)
Description copied from class: Animation
Draws the animation using the specified graphics context.

Overrides:
paint in class AbstractDicesAnim

isFinished

public boolean isFinished()
Description copied from class: Animation
Probes to check if the animation can be removed

Overrides:
isFinished in class AbstractDicesAnim

onExit

public void onExit()
Start a new turn for the winning color.

Overrides:
onExit in class Animation