(ns advent.saves) (def chapters {:chapter-1 {:state {:y 54.93726516381327, :active? true, :plaques-read #{}, :time :intro, :inventory [], :seen-intro? false, :clues #{}, :hud-active? false, :x 139.7490606552531, :last-room :dream, :mints-eaten 0, :object nil, :obtained-items #{}}} :chapter-2 nil :chapter-3 nil :chapter-4 nil :chapter-5 nil}) (def chapter-name {:chapter-1 "Our Tale's Beginning" :chapter-2 "To Be a Knight" :chapter-3 "In the Slammer" :chapter-4 "Tick the Ex-con" :chapter-5 "Slingshot Stew"}) (defn default-screenshot [state] (let [answers {:inside-house "screenshots/inside-house.png" :inside-stash "screenshots/inside-stash.png" :outside-house {:day "screenshots/outside-house-day.png" :night "screenshots/outside-house-night.png"} :behind-house {:day "screenshots/behind-house-day.png" :night "screenshots/behind-house-night.png"} :cat-tree {:day "screenshots/cat-tree-day.png" :night "screenshots/cat-tree-night.png"} :inside-castle {:day "screenshots/inside-castle-day.png" :night "screenshots/inside-castle-night.png"} :space "screenshots/duel.png" :held "screenshots/held.png" :tongue-fight "screenshots/tongue-fight.png" :inside-cafeteria "screenshots/cafeteria.png" :inside-antique "screenshots/inside-antique.png" :inside-jail "screenshots/inside-jail.png" :dream "screenshots/dream.png" :castle-gate "screenshots/castle-gate.png" :outside-jail {:day "screenshots/fountain-day.png" :night "screenshots/fountain-night.png"} :outside-castle {:day "screenshots/outside-castle-day.png" :night "screenshots/outside-castle-night.png"}}] (println (:last-room state)) (get-in answers [(:last-room state) (:time state)] (get-in answers [(:last-room state)]))))