Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Answer Question 1,2 by Dr. Racket program 1. (25 points) Design tick-f function which takes list-of-shapes and produces a list-of-shapes. The function add the y
Answer Question 1,2 by Dr. Racket program
1. (25 points) Design tick-f function which takes list-of-shapes and produces a list-of-shapes. The function add the y position of shapes by one. 2. (25 points) Design key-f function which takes list-of-shapes and keyEvent and produces a list-of-shapes. The function checks the key event. If key event is: o then add a new orange shape with random size (SIZE) and random position where x is between (0,W) and y is between (0,Hto the list-of-shapes. ir then add a new red shape with random size (SIZE) and random position where x is between [0.W] and y is between 0.1] to the list-of-shapes. p then add a new pink shape with random size (SIZE) and random position where x is between (0,W) and y is between (0.1) to the list-of-shapes. a b then add a new blue shape with random size (SIZE) and random position where x in between 10.W) and y is between 0.H) to the list-of-shapes. & then add a new green shape with random size (SIZE) and random position where x is between (0.W) and y is between 0,H] to the list-of-shapes. else do not add any shape and show list-of-shape itself Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started