]> gitweb.factorcode.org Git - factor.git/commitdiff
Add a word that waits for a game to finish running
authorDoug Coleman <doug.coleman@gmail.com>
Wed, 16 Jun 2010 21:05:35 +0000 (16:05 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Wed, 16 Jun 2010 21:23:30 +0000 (16:23 -0500)
extra/game/worlds/worlds.factor

index 8e51563b62e3217eb7bcee423a99ecc74b0723d1..a04ac3f1955694d9429667656b6c28271d870230 100644 (file)
@@ -74,6 +74,9 @@ M: game-world apply-world-attributes
 : start-game ( attributes -- game-world )
     f swap open-window* ;
 
+: wait-game ( attributes -- game-world )
+    f swap open-window* dup promise>> ?promise drop ;
+
 : define-attributes-word ( word tuple -- )
     [ name>> "-attributes" append create-in ] dip define-constant ;