changeset 89:2f478abe57d0

added sanity check for title
author Robert McIntyre <rlm@mit.edu>
date Sat, 10 Mar 2012 15:55:10 -0600
parents 65c2854c5875
children 778cb84a2244
files clojure/com/aurellem/title.clj
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/title.clj	Sat Mar 10 15:36:26 2012 -0600
     1.2 +++ b/clojure/com/aurellem/title.clj	Sat Mar 10 15:55:10 2012 -0600
     1.3 @@ -83,12 +83,13 @@
     1.4         scroll-text
     1.5         scroll-text))
     1.6  
     1.7 -(defn write-intro! []
     1.8 +(def title-frames 2323)
     1.9 +
    1.10 +(defn title-checkpoint! []
    1.11    (let [[moves state] (finish-title)]
    1.12 +    (assert (= title-frames (:frame state)))
    1.13      [(write-moves! moves) (write-state! state)]))
    1.14  
    1.15 -(def title-frames 2323)
    1.16 -
    1.17  (defn intro []
    1.18    [(read-moves title-frames)
    1.19     (read-state title-frames)])
    1.20 @@ -96,7 +97,5 @@
    1.21  (defn test-intro []
    1.22    (play-vbm (moves->filename title-frames)))
    1.23  
    1.24 -
    1.25 -
    1.26  ;; TODO might be able to glue these together more elegantly with monads
    1.27