Exercise 2 (javascript code) a. Make a function that can draw a tree at a specif
ID: 3875808 • Letter: E
Question
Exercise 2 (javascript code)
a. Make a function that can draw a tree at a specific x, y location
i. (It doesn’t have to be fancy, say 64X64 pixels).
b. Make a function that can draw a square brick wall (64X64). (again doesn't have to be fancy)
c. Using a 2D array create a mock-up level of mountains, trees and a background.
i. Before careful of draw order here.
ii. Use numbers 1 = wall, 2 equals tree, break the level up into a 64X64 pixel grid.
iii. Background can be a single color, however the trees and walls must stand out on it. (Background cannot be white)
Explanation / Answer
<html >
<head>
<meta chset="utf-8">
<title>Generate Tree</title>
</head>
<body>
<script>
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.