sdr 0.7

net.cscott.sdr
Class ChoreoEngine

java.lang.Object
  extended by net.cscott.sdr.ChoreoEngine

public class ChoreoEngine
extends Object

ChoreoEngine specifies the interface through which the choreography engine communicates with the rest of the SDR application.

Version:
$Id: ChoreoEngine.java,v 1.2 2006-11-10 00:56:07 cananian Exp $
Author:
C. Scott Ananian

Field Summary
 Mode mode
           
 
Constructor Summary
ChoreoEngine(DanceProgram dp, Formation f, DanceFloor danceFloor, ScoreAccumulator score, HUD hud, CommandInput input)
           
 
Method Summary
 Formation currentFormation()
           
 MultiMap<Dancer,DancerPath> execute(String unparsedCall, ScoreAccumulator score)
          Given a TimedFormation representing the "current" dancer formation, perform the given call.
 Apply lastCall()
           
 CountDownLatch switchToDancing()
           
 CountDownLatch switchToMenu()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mode

public final Mode mode
Constructor Detail

ChoreoEngine

public ChoreoEngine(DanceProgram dp,
                    Formation f,
                    DanceFloor danceFloor,
                    ScoreAccumulator score,
                    HUD hud,
                    CommandInput input)
Method Detail

switchToMenu

public CountDownLatch switchToMenu()

switchToDancing

public CountDownLatch switchToDancing()

execute

public MultiMap<Dancer,DancerPath> execute(String unparsedCall,
                                           ScoreAccumulator score)
                                    throws BadCallException
Given a TimedFormation representing the "current" dancer formation, perform the given call. The result will be a list of future formations, sorted by the time at which they occur (with the earliest first). No dancer will turn more than 1 wall (90 degrees) between formations. All times in the TimedFormations will be absolute.

Parameters:
unparsedCall - The (sequence of) call(s) to perform.
Returns:
a time-stamped list of result formations, with absolute times.
Throws:
BadCallException - if (some part of) the given call is impossible from the given start formation.

lastCall

public Apply lastCall()

currentFormation

public Formation currentFormation()

sdr 0.7

Copyright © 2006-2009 C. Scott Ananian