Mercurial > hg > tweakathon2ios
diff SequenceController.h @ 43:4ad0d218f890
can skip runs if it crashed etc.
author | Robert Tubb <rt300@eecs.qmul.ac.uk> |
---|---|
date | Mon, 15 Dec 2014 12:51:09 +0000 |
parents | 2bd658b44c2d |
children | d810aa9ca03a |
line wrap: on
line diff
--- a/SequenceController.h Mon Dec 08 18:29:10 2014 +0000 +++ b/SequenceController.h Mon Dec 15 12:51:09 2014 +0000 @@ -16,9 +16,9 @@ #define MIN_TARGETS_IN_SEQUENCE 1 #define NUM_REPETITIONS_AT_LEVEL 2 -#define MAX_TARGETS_IN_SEQUENCE 3 -#define MIN_TEMPO 70 -#define MAX_TEMPO 500 +#define MAX_TARGETS_IN_SEQUENCE 4 +#define MIN_TEMPO 90 +#define MAX_TEMPO 520 #define TEMPO_RANDOM_AMOUNT #define MAX_TIME 2800 #define MIN_TIME 200 @@ -55,7 +55,7 @@ } void setTempoFromTime(){ - tempo = 60.0 / (4* timeAllowedMs*1000.0); + tempo = 4 * 1000. * 60.0 / (timeAllowedMs); } void setTimeFromTempo(){ timeAllowedMs = 4*1000* (60.0/tempo); @@ -78,7 +78,7 @@ bool showsGuides; // depends on 'level' bool showsIcons; bool showsResultsAtEnd; - + int totalLengthOfSeq; vector<int> thisSequence; // so that we can show the whole sequence at the top? TrainingTestResult result; // only applies to steps that were scored. @@ -132,19 +132,22 @@ class SequenceController{ public: SequenceController(); - void init(bool asoundOnlyMode); + void init(bool asoundOnlyMode, controlPanelType whichInterfaceAreWeUsing); AnimStep getNextStep(); void setToStart(); void stepForward(); - float getStartTickTime(); + float getStartIntervalTime(); void saveResultForCurrentStep(TrainingTestResult result); TrainingTestResult getResultForPreviousStep(); int getTotNumRuns(){return totNumRuns;}; + int getCurrentRunNumber(){return currentRunNumber;}; + void skipRun(); private: void generateSteps(); - void generateCountIn(int countInLength); - void generateRun(int run, int numInSequence); - void generateARun(int run, int numInSequence); // use this + void generateTestSequence(); + void generateCountIn(int countInLength, int runNumber); + void generateRun(int run, int numInSequence);// use this now + void generateARun(int run, int numInSequence); void generateAnEasyRun(int run, int numInSequence = 1); void generateASoundOnlyRun(int run, int numInSequence); vector<int> randomSequence(int numInSequence); @@ -159,7 +162,10 @@ float tempoInc; int timeInc; bool soundOnlyMode; + controlPanelType panelType; int totNumRuns; + vector<int> timeIntervalsHard; + int currentRunNumber; }; #endif /* defined(__riftathon__SequenceGenerator__) */