 USING: accessors arrays assocs combinators combinators.smart
 continuations formatting io kernel math math.functions
 math.parser prettyprint quotations random sequences
-sequences.extras splitting strings unicode ;
+sequences.extras splitting strings unicode unicode.flags
+unicode.flags.images ;
 IN: quiz
 
 GENERIC: generate-question* ( question -- quot )

M: state-capital-question generate-question* drop state-capitals keys random '[ _ state-capital ] ;
M: state-capital-question parse-response drop trim-blanks >title ;

CONSTANT: stack-shufflers { dup 2dup drop 2drop swap over rot -rot roll -roll 2dup pick dupd }

M: stack-shuffler generate-question*

        T{ stack-shuffler { n-shufflers 4 } }
    } 5 run-multiple-choice-quiz score-quiz ;

: run-country-from-flag-quiz ( -- )
    {
        T{ country-from-flag { n 4 } }
    } 5 run-multiple-choice-quiz score-quiz ;

: run-flag-from-countries-quiz ( -- )
    {
        T{ flag-from-countries { n 4 } }
    } 5 run-multiple-choice-quiz score-quiz ;

: run-main-quiz ( -- )
    {
        T{ multiplication { count 10 } { n 10 } }
