a dice-throw game with canvas
- 7/11 √
- 2/3/12 ×
- 4/5/6/8/9/10 continue
- 7 ×
- 4/5/6/8/9/10 √
- 2/3/11/12 continue
Click throw
, two dice faces will change its number util t second. Then, The points will be displayed and You Win!
or You Lose TAT
will be shown.
canvas
<canvas>Your browser don't support canvas tag</canvas>
ctx = doc.getEleById
ctx.strokeRect(Lx, Ly, w, h)
ctx.lineWidth =
ctx.strokeStyle = "rgb(255, 0, 0)"
ctx.fillStyle = "rgb(255, 0, 0)"
ctx.strokeReact(x, y, w, h)
ctx.fillReact(x, y, w, h)
ctx.beginPath()
ctx.closePath()
ctx.fill()
ctx.arc(cx, cy, radius, start_angle, end_angle, direction)
ctx.clearRext(x, y, w, h)
ctx.moveTo
ctx.lineTo