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
This looks pretty good. I feel like you're writing more code than you need to. Might be easier to define the x and y once at the top and use them in the code below:
// define x and y hereconstx=4*sizeconsty=1*sizectx.beginPath()// Use x and y herectx.rect(x+5,y+5,size-10,size-10)ctx.fillStyle='red'ctx.fill()ctx.beginPath()// and herectx.rect(x+10,y+10,size-20,size-20)ctx.fillStyle='orange'ctx.fill()ctx.beginPath()// and herectx.rect(x+15,y+15,size-30,size-30)ctx.fillStyle='yellow'ctx.fill()...
The text was updated successfully, but these errors were encountered:
shared-canvas/mario.js
Line 4 in e393e3c
This looks pretty good. I feel like you're writing more code than you need to. Might be easier to define the x and y once at the top and use them in the code below:
The text was updated successfully, but these errors were encountered: