comparison clojure/com/aurellem/run/bootstrap_1.clj @ 604:c8cda378e1a0

fixed flaw in advanced move recording.
author Robert McIntyre <rlm@mit.edu>
date Sun, 02 Sep 2012 10:34:14 -0500
parents b3e5006e23f0
children 54644b08da1a
comparison
equal deleted inserted replaced
603:b3e5006e23f0 604:c8cda378e1a0
148 148
149 (def desired-zero-quantities 149 (def desired-zero-quantities
150 (map second (filter (comp (partial = 0) first) 150 (map second (filter (comp (partial = 0) first)
151 (partition 2 (pc-item-writer-program))))) 151 (partition 2 (pc-item-writer-program)))))
152 152
153 (defn bootstrap-corrupt-save 153 (defn-memo bootstrap-corrupt-save
154 ([] (bootstrap-corrupt-save (to-room-pc))) 154 ([] (bootstrap-corrupt-save (to-room-pc)))
155 ([script] 155 ([script]
156 (->> script 156 (->> script
157 (do-save-corruption 3) 157 (do-save-corruption 3)
158 (corrupt-item-list 0) 158 (corrupt-item-list 0)
196 ;;0 -- 256 196 ;;0 -- 256
197 ;;1 -- 254 197 ;;1 -- 254
198 ;;2 -- 254 198 ;;2 -- 254
199 ;;3 -- 255 199 ;;3 -- 255
200 200
201 (defn activate-home-pc 201 (defn-memo activate-home-pc
202 [script] 202 [script]
203 (->> script 203 (->> script
204 (delayed-difference [] [:a] 204 (delayed-difference [] [:a]
205 200 first-character) 205 200 first-character)
206 (scroll-text))) 206 (scroll-text)))
558 (deposit-held-item-named :awakening 4) 558 (deposit-held-item-named :awakening 4)
559 (deposit-held-item-named :thunderstone 98) 559 (deposit-held-item-named :thunderstone 98)
560 (deposit-held-item-named :TM09 55) 560 (deposit-held-item-named :TM09 55)
561 (deposit-held-item-named 0x00 55)))) 561 (deposit-held-item-named 0x00 55))))
562 562
563 (defn hacking-2 563 (defn-memo hacking-2
564 ([] (hacking-2 (hacking-1))) 564 ([] (hacking-2 (hacking-1)))
565 ([script] 565 ([script]
566 (->> script 566 (->> script
567 (to-held-items) 567 (to-held-items)
568 (toss-held-item 0 166) ;; discard cruft 568 (toss-held-item 0 166) ;; discard cruft
807 (set-memory-range 807 (set-memory-range
808 (inc pc-item-list-start) 808 (inc pc-item-list-start)
809 (pc-item-writer-program)))]) 809 (pc-item-writer-program)))])
810 810
811 811
812 (defn launch-main-bootstrap-program 812 (defn-memo launch-main-bootstrap-program
813 ([] (launch-main-bootstrap-program 813 ([] (launch-main-bootstrap-program
814 ;;(control-checkpoint) 814 ;;(control-checkpoint)
815 (launch-bootstrap-program) 815 (launch-bootstrap-program)
816 ;;(item-writer-test-script) 816 ;;(item-writer-test-script)
817 )) 817 ))