You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this assignment you will create a simulation of the Etch-A-Sketch toy
Suggested steps to complete this assignment
Start a new program. Save your program with a meaningful name.
In setup() draw one rectangle that fills the screen and then a slightly smaller differently colored rectangle inside of it. Delete the background() in draw() and run your program.
Declare and initialize two global variables x, y and and initialize them to the center of the screen.
In draw() draw a small white circle at (x,y).
Add some if statements:
If key means "up", decrease y
If key means "down", increase y
If key means "left", decrease x
If key means "right", increase x
You can decorate your Etch-A-Sketch with the text() function