From 6dddc7840c0dc469a08e9dfa334e9235f66014a0 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Sat, 10 Mar 2018 03:29:11 +0000 Subject: Add net/ricketyspace/ror/five/ufo.rkt --- .../ror/five/resources/zarking-ufo.png | Bin 0 -> 1337 bytes .../ror/five/resources/zarking-ufo.svg | 128 +++++++++++++++++++++ net/ricketyspace/ror/five/ufo.rkt | 23 ++++ 3 files changed, 151 insertions(+) create mode 100644 net/ricketyspace/ror/five/resources/zarking-ufo.png create mode 100644 net/ricketyspace/ror/five/resources/zarking-ufo.svg create mode 100644 net/ricketyspace/ror/five/ufo.rkt diff --git a/net/ricketyspace/ror/five/resources/zarking-ufo.png b/net/ricketyspace/ror/five/resources/zarking-ufo.png new file mode 100644 index 0000000..bd5eb43 Binary files /dev/null and b/net/ricketyspace/ror/five/resources/zarking-ufo.png differ diff --git a/net/ricketyspace/ror/five/resources/zarking-ufo.svg b/net/ricketyspace/ror/five/resources/zarking-ufo.svg new file mode 100644 index 0000000..84b8844 --- /dev/null +++ b/net/ricketyspace/ror/five/resources/zarking-ufo.svg @@ -0,0 +1,128 @@ + + + + + Zarking UFO + + + + + + image/svg+xml + + Zarking UFO + + 2018-03-09 + + + rsiddharth <s@ricketyspace.net> + + + + + + + + + + + + + + + + + + + + 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)) + -- cgit v1.2.3