public void InitPseudoCodeViewer(TeachingAlgorithm algorithm, bool includeLineNr, bool inDetailStep) { this.algorithm = algorithm; algorithm.PseudoCodeViewer = this; this.includeLineNr = includeLineNr; this.inDetailStep = inDetailStep; demoStepDuration = algorithm.DemoStepDuration; }
/* Prepares the next instruction based on the algorithm being runned * - Sends instruction to the next sorting element the user should move * - Beginners (difficulty) will be shown steps on pseudoboard and given some hints * - Skips instructions which doesn't contain any elements nor destination */ //protected abstract int PrepareNextInstruction(InstructionBase instruction); // --------------------------------------- Other --------------------------------------- protected virtual IEnumerator FinishUserTest() { audioManager.Play("Finish"); yield return(finishStepDuration); TeachingAlgorithm algorithm = GetTeachingAlgorithm(); algorithm.IsTaskCompleted = true; if (algorithm.PseudoCodeViewer != null) { algorithm.PseudoCodeViewer.RemoveHightlight(); } }