summaryrefslogtreecommitdiff
path: root/examples/common.scm
blob: 0c380f2f7602aa78e362c5251163dca374124110 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
(use-modules (2d keyboard)
             (2d game)
             (2d window)
             (2d repl server))

(spawn-server)

(add-hook! key-press-hook (lambda (key unicode)
                            (when (eq? key 'escape)
                              (quit-game))))

(add-hook! window-close-hook quit-game)