PROVIDED CODE
READ ONLY
// Your code name is stored in NAME
async function drawPixel(x, y, color) {
// paints a pixel on the room screen
}
function getPixel(x, y) {
// returns owner's name, or "" if empty
}
Ctrl+Enter to run
My Pixels
Challenges
1
Draw one pixel at any coordinate
drawPixel(x, y, "color")
2
3
Write a function that draws a shape
function drawBox(x, y) { ... }
4
Steal a friend's pixels using getPixel()
let owner = getPixel(x, y)