Commits

Colin Copeland committed 23b0cf3

adjust board width/heigh for line width

Comments (0)

Files changed (1)

tic-tac-toe/media/game.js

 
 function setup_board(ctx) {
     box_size = ctx.canvas.width/3.0;
+    // adjust board size to fit line widths
+    ctx.canvas.width += line_size;
+    ctx.canvas.height += line_size;
     console.log('box size', box_size);
     console.log('line size', line_size);
     ctx.clearRect(0, 0, ctx.canvas.height, ctx.canvas.width);