summaryrefslogtreecommitdiffstats
path: root/net/ricketyspace/ror/five/ufo.rkt
diff options
context:
space:
mode:
Diffstat (limited to 'net/ricketyspace/ror/five/ufo.rkt')
-rw-r--r--net/ricketyspace/ror/five/ufo.rkt23
1 files changed, 23 insertions, 0 deletions
diff --git a/net/ricketyspace/ror/five/ufo.rkt b/net/ricketyspace/ror/five/ufo.rkt
new file mode 100644
index 0000000..9acdd2c
--- /dev/null
+++ b/net/ricketyspace/ror/five/ufo.rkt
@@ -0,0 +1,23 @@
+#lang racket
+(require 2htdp/universe 2htdp/image)
+
+(define WIDTH 300)
+(define HEIGHT 325)
+
+(define (add-3-to-state current-state)
+ (+ current-state 3))
+
+(define (draw-a-ufo-onto-an-empty-scene current-state)
+ (place-image IMAGE-of-UFO (/ WIDTH 2) current-state
+ (empty-scene WIDTH HEIGHT)))
+
+(define IMAGE-of-UFO (bitmap/file "resources/zarking-ufo.png"))
+
+(define (state-is-300 current-state)
+ (>= current-state 300))
+
+(big-bang 0
+ (on-tick add-3-to-state)
+ (to-draw draw-a-ufo-onto-an-empty-scene)
+ (stop-when state-is-300))
+