summaryrefslogtreecommitdiffstats
path: root/net/ricketyspace/ror/five/ufo.rkt
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2018-03-10 03:29:11 +0000
committerrsiddharth <s@ricketyspace.net>2018-03-10 03:29:11 +0000
commit6dddc7840c0dc469a08e9dfa334e9235f66014a0 (patch)
tree053fc6d1525e314e692066d60a0a2d5682d823db /net/ricketyspace/ror/five/ufo.rkt
parent74151dfc48e6be6dba11a0776af24c39eb9f592d (diff)
Add net/ricketyspace/ror/five/ufo.rkt
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))
+