##// END OF EJS Templates
API call for FOR loop to make the main code less cluttered
API call for FOR loop to make the main code less cluttered

File last commit:

r18:6b72d87e default
r19:c40f6d7d default
Show More
main.ps
32 lines | 786 B | application/postscript | PostScriptLexer
(in-package sugar-qsp)
(setf (root)
(ps:create
;;; Game session state
;; Variables
vars (ps:create)
;; Inventory (objects)
objs (list)
;;; Transient state
;; Savegame data
state-stash (ps:create)
;; List of audio files being played
playing (ps:create)
;; Local variables stack (starts with an empty frame)
locals (list)
;;; Game data
;; ACTions
acts (ps:create)
;; Locations
locs (ps:create)))
;; Launch the game from the first location
(setf window.onload
(lambda ()
(api-call init-dom)
(funcall (ps:getprop (root locs)
(ps:chain *object (keys (root locs)) 0))
(list))
(values)))