Question: Drracket program coding problem: Simulate Balloon popping ; Balloon popping ( define WIDTH 5 0 0 ) ( define HEIGHT 5 0 0 ) (
Drracket program coding problem: Simulate Balloon popping ; Balloon popping
define WIDTH
define HEIGHT
define MTS emptyscene WIDTH HEIGHT
define BALLOONCOLOR "red"
define POPIMAGE
overlay text "POP!" "black"
radialstar WIDTH WIDTH "solid" "yellow"
define CTRX WIDTH
define CTRY HEIGHT
define SPEED
define MAXSIZE WIDTH
@htdd Balloon
;; Balloon is
;; FUNCTIONS
@problem
@htdf main
;@signature WS WS ; UNCOMMENT once WS is replaced with world state type
;; starts the world program with
; no examples for main function
@templateorigin htdwmain
define main ws
bigbang ws ; WS
ontick tick ; WS WS
todraw render ; WS Image
; stopwhen ; WS Boolean
; onmouse ; WS Integer Integer MouseEvent WS
; onkey ; WS KeyEvent WS
@problem
@htdf tick
;@signature WS WS ; UNCOMMENT when WS is replaced by world state type
;; produce the next
;;
define tick ws
@problem
@htdf render
;@signature WS Image ; UNCOMMENT when WS is replaced by world state type
;; render
;;
define render ws
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
