From 22faa12205cc7666e6884af5ca5b75beb281235e Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Wed, 16 Jun 2010 16:05:35 -0500 Subject: [PATCH] Add a word that waits for a game to finish running --- extra/game/worlds/worlds.factor | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extra/game/worlds/worlds.factor b/extra/game/worlds/worlds.factor index 8e51563b62..a04ac3f195 100644 --- a/extra/game/worlds/worlds.factor +++ b/extra/game/worlds/worlds.factor @@ -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 ;