 ! (c)2009 Joe Groff bsd license
-USING: accessors combinators fry game.input game.loop generic kernel math
-parser sequences ui ui.gadgets ui.gadgets.worlds ui.gestures threads
-words audio.engine destructors ;
+USING: accessors audio.engine combinators destructors fry
+game.input game.loop generic kernel math parser sequences
+threads ui ui.gadgets ui.gadgets.worlds ui.gestures words
+words.constant ;
 IN: game.worlds
 
 TUPLE: game-world < world

        [ call-next-method ]
    } cleave ;

SYNTAX: GAME:
    CREATE
    game-attributes parse-main-window-attributes
    parse-definition
    define-main-window ;

    [ >>game-loop begin-game-world ] keep start-loop ;

M: game-world end-world
    dup game-loop>> [ stop-loop ] when*
    [ end-game-world ]
    [ audio-engine>> [ dispose ] when* ]
    [ use-game-input?>> [ close-game-input ] when ] tri ;
