ks.common.games
Class SolitaireSolver

java.lang.Object
  extended byks.common.games.SolitaireSolver
All Implemented Interfaces:
java.lang.Runnable

public class SolitaireSolver
extends java.lang.Object
implements java.lang.Runnable

Starts separate thread to try each available move until the game is over. Make use of the fact that there are no drags, only instantaneous moves. So we can simply call refreshAllWidgets() to ensure all changes are reflected.

Creation date: (11/21/01 10:25:52 PM)


Constructor Summary
SolitaireSolver(Solitaire theGame)
          SolitaireSolver constructor.
 
Method Summary
 void run()
          Do the dirty work.
 void start()
          Launch the thread to execute run.
 void stop()
          Stop this thread.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SolitaireSolver

public SolitaireSolver(Solitaire theGame)
SolitaireSolver constructor.

The given Solitaire game must implement SolitaireSolver otherwise an exception will result.

Method Detail

run

public void run()
Do the dirty work. Creation date: (10/2/01 5:17:01 PM)

Specified by:
run in interface java.lang.Runnable

start

public void start()
Launch the thread to execute run. Creation date: (10/2/01 5:17:12 PM)


stop

public void stop()
Stop this thread.