Question: Exercise 7.3 (Extra credit) Write a JavaScript program which will simulate turtle graphics. You will use two dimensional array to represent a floor of 20




Exercise 7.3 (Extra credit) Write a JavaScript program which will simulate turtle graphics. You will use two dimensional array to represent a floor of 20 x 20. The commands that you can give to the turtle is Command meaning Pen up Pen down Turn right Turn left 1 2 4 Two commands means move forward 12 spaces. You can specify how many steps by change 12 to that value. For example 5, 3 means you enter 5 press the 5, 12 Print the 20 x 20 array End of data Your program will list the commands and their meaning. There are one textbox for user to enter command number, two buttons: one for send command, the other one for process the commands sent. The following shows the screen shot
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
