-! (c)2009 Joe Groff bsd license
+! Copyright (C) 2009 Joe Groff.
+! See http://factorcode.org/license.txt for BSD license.
USING: accessors audio.engine combinators concurrency.promises
-destructors fry game.input game.loop generic kernel math parser
-sequences threads ui ui.gadgets ui.gadgets.worlds ui.gestures
-words words.constant ;
+destructors game.input game.loop kernel math parser sequences
+threads ui ui.gadgets ui.gadgets.worlds vocabs.parser
+words.constant ;
IN: game.worlds
TUPLE: game-world < world
f swap open-window* dup promise>> ?promise drop ;
: define-attributes-word ( word tuple -- )
- [ name>> "-attributes" append create-in ] dip define-constant ;
+ [ name>> "-attributes" append create-word-in ] dip define-constant ;
SYNTAX: GAME:
- CREATE
- game-attributes parse-main-window-attributes
+ scan-new-word
+ game-attributes parse-window-attributes
2dup define-attributes-word
parse-definition
- define-main-window ;
+ [ define-window ] [ 2drop current-vocab main<< ] 3bi ;