sdr 0.7

net.cscott.sdr.calls.lists
Class C4List

java.lang.Object
  extended by net.cscott.sdr.calls.lists.C4List

public abstract class C4List
extends Object

The C4List class contains complex call and concept definitions which are on the 'C4' program. Note that "simple" calls and concepts are defined in the resource file at net/cscott/sdr/calls/lists/c4.calls; this class contains only those definitions for which an executable component is required.

Author:
C. Scott Ananian

Field Summary
static Call _FIRST_PART
           
static Call LIKE_A
           
static Call SLIM_DOWN
          Slim Down is defined from arbitrary formations, as long as each quadrant has one center and one end that are as if in a 2x4.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SLIM_DOWN

public static final Call SLIM_DOWN
Slim Down is defined from arbitrary formations, as long as each quadrant has one center and one end that are as if in a 2x4.

Tests:
Application from a non 2x4.
js> importPackage(net.cscott.sdr.calls);
js> importPackage(net.cscott.sdr.calls.ast);
js> FormationList = FormationList.js(this); undefined;
js> const SD = StandardDancer;
js> f1 = FormationList.EIGHT_CHAIN_THRU.mapStd([SD.COUPLE_4_BOY, SD.COUPLE_1_GIRL, SD.COUPLE_4_GIRL, SD.COUPLE_1_BOY]); f1.toStringDiagram("|")
|4Bv  1Gv
|
|4G^  1B^
|
|3Bv  2Gv
|
|3G^  2B^
js> f2 = FormationList.LINES_FACING_OUT.mapStd([SD.COUPLE_4_BOY, SD.COUPLE_4_GIRL, SD.COUPLE_1_BOY, SD.COUPLE_1_GIRL]) ; f2.toStringDiagram("|")
|4B^  4G^  1B^  1G^
|
|3Gv  3Bv  2Gv  2Bv
js> // merge these formations
js> f3 = f2; [SD.COUPLE_1_BOY, SD.COUPLE_1_GIRL, SD.COUPLE_3_BOY, SD.COUPLE_3_GIRL].forEach(function(d) { f3 = f3.move(d, f1.location(d)); });
js> f3.toStringDiagram("|")
|          1Gv
|
|4B^  4G^  1B^
|
|     3Bv  2Gv  2Bv
|
|     3G^
js> ds = new DanceState(new DanceProgram(Program.C4), f3); undefined;
js> Evaluator.parseAndEval(ds, "slim down")
js> // check result and confirm there is no roll or sweep
js> ds.currentFormation().toStringDiagramWithDetails("|")
|     4G^                          ^
|
|     4B^  1Gv  1B^                ^    v    ^
|
|3Bv  3G^  2Bv                v    ^    v
|
|          2Gv                          v
js> // check sashay flags
js> ds.movements(SD.COUPLE_1_BOY)
[DancerPath[from=1,1,n,to=3,1,n,time=2,pointOfRotation=<null>,flags=[SASHAY_START, SASHAY_FINISH]]]
js> ds.movements(SD.COUPLE_1_GIRL)
[DancerPath[from=1,3,s,to=1,1,s,time=2,pointOfRotation=<null>]]
js> // quickly check a more typical example
js> ds = new DanceState(new DanceProgram(Program.C4), FormationList.PARALLEL_RH_WAVES); undefined
js> ds.currentFormation().toStringDiagram("|")
|^    v    ^    v
|
|^    v    ^    v
js> Evaluator.parseAndEval(ds, "slim down")
js> ds.currentFormation().toStringDiagram("|")
|v    ^
|
|^    v
|
|^    v
|
|v    ^

LIKE_A

public static final Call LIKE_A

_FIRST_PART

public static final Call _FIRST_PART

sdr 0.7

Copyright © 2006-2009 C. Scott Ananian