Reply To: Dot-memory test

PennController for IBEX Forums Support Dot-memory test Reply To: Dot-memory test

#9948
Jeremy
Keymaster

Hi Ebru,

When you place a test command inside a wait command, the latter is only validated when the test succeeds. If you’d rather always validate the wait command, just leave its parentheses blank (ie. .wait()) and move the test below it if you’d like to show some feedback once the participant clicks the button. The question then is how to move from printing the feedback to the next trial; for example, you could simply wait 2s:

        newButton("press")
            .center()
            .print()
            .wait()
        ,
        newFunction( 
                ()=>[...document.querySelectorAll(".PennController-Scale input")].map(c=>Number(c.checked)).join('') 
            )
            .test.is([row.r1c1,row.r1c2,row.r1c3,row.r2c1,row.r2c2,row.r2c3,row.r3c1,row.r3c2,row.r3c3].join('') )
            .success( newText("Good job!").print() )
            .failure( newText("Incorrect! Better luck next time").print() )
        ,
        newTimer(2000).start().wait()

Jeremy