From 212900bc1a39ba3174f8c25854dfdf909088a09b Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Fri, 23 Oct 2015 21:49:21 -0400 Subject: [PATCH] Cope with quit-world in the middle of an action sequence; TODO: unclear whether this is the best approach --- prospect/core.rkt | 1 + 1 file changed, 1 insertion(+) diff --git a/prospect/core.rkt b/prospect/core.rkt index 6f06626..5a366ae 100644 --- a/prospect/core.rkt +++ b/prospect/core.rkt @@ -293,6 +293,7 @@ (define (perform-actions w) (for/fold ([wt (transition (struct-copy world w [pending-action-queue (make-queue)]) '())]) ((entry (in-list (queue->list (world-pending-action-queue w))))) + #:break (quit? wt) ;; TODO: should a quit action be delayed until the end of the turn? (match-define [cons label a] entry) (trace-internal-action label a (transition-state wt)) (define wt1 (transition-bind (perform-action label a) wt))