-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpong.rkt
49 lines (42 loc) · 1.7 KB
/
pong.rkt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#lang typed/racket/base
(require
typed/racket/gui
pict3d/universe
"./lib/config.rkt"
"./lib/on-draw/on-draw.rkt"
"./lib/on-frame/on-frame.rkt"
"./lib/on-key/on-key.rkt"
"./lib/on-mouse/on-mouse.rkt"
"./lib/sound/sound.rkt"
"./lib/state/init.rkt"
"./lib/state/stop.rkt"
"./lib/state/validation.rkt")
;
; / ═══ \
; / \
; ⊖ / \
; / / ╭─╮ \
; x / ╰─╯ \
; / / \ ⊕
; ⊕ / \ |
; / ╓───────╖ \ z
; / ╙───────╜ \ |
; / ⊖ ——— y ——— ⊕ \ ⊖
; Names:
; - Bumper: the glowing rails along the sides of the arena, off of which the balls bounce
; - Paddle: the rectangular prisms controlled by the player and opponent
(rs-play SOUND-STARTUP)
(big-bang3d (state-start)
#:frame-delay FRAME-DELAY-MILLIS
#:name "Pong3D — Racket"
#:on-draw on-draw
#:on-frame on-frame
#:on-key on-key
#:on-mouse on-mouse
#:on-release on-release
#:stop-state? stop-state?
#:valid-state? valid-state?
#:width SCREEN-WIDTH
#:height SCREEN-HEIGHT)
(rs-stop)
(exit 0)