JSFiddle - React, Tailwind, and code Playground

by frogggeee McFrogggeee

HTML

<!DOCTYPE html>
<html>
<head>
<body>
<h1>tic tac toe</h1>
<p>by frogggeee</p>
<canvas id = "canvas" width = "480" height = "360"></canvas>
<script>
//////////////////////
//----------|84
// 1 |2 |4  |7
// 8 |16|32 |56
// 64|128|256|448
//----------|273
// 73|146|292
/////////////////////////
let winningCombos = [84, 7, 56, 448, 273, 292, 146, 73];
let X = 0;
let O = 0;
let canvas = document.getElementById("canvas");
let ctx = canvas.getContext("2d");
function drawBoard() {
	ctx.beginPath();
  ctx.rect(70, 0, 3, 210);
  ctx.fillStyle = "#000000";
  ctx.fill();
  ctx.closePath();
  ctx.beginPath();
  ctx.rect(140, 0, 3, 210);
  ctx.fillStyle = "#000000";
  ctx.fill();
  ctx.closePath();
  ctx.beginPath();
  ctx.rect(0, 70, 220, 3);
  ctx.fillStyle = "#000000";
  ctx.fill();
  ctx.closePath();
  ctx.beginPath();
  ctx.rect(0, 140, 220, 3);
  ctx.fillStyle = "#000000";
  ctx.fill();
  ctx.closePath();
}
drawBoard();
function render() {
	ctx.clearRect(1000, 1000);
	drawBoard();
}
setInterval(render, 10);
</script>
</body>
</head>
</html>