JSFiddle - React, Tailwind, and code Playground
by frogggeee McFrogggeee
HTML
<!DOCTYPE html>
<html>
<head>
<body>
<h1>
coup
</h1>
<button type = "button" onClick = "game()">new game</button>
<canvas id = "canvas"></canvas>
<script>
let aiNames = ["tommy", "bobby", "jimmy", "timmy", "kimmy", "chimmy"];
let aiName = "AI " + aiNames[Math.floor(Math.random() * aiNames.length)];
let turn = Math.floor(Math.random() * 1);
function game() {
aiName = "AI " + aiNames[Math.floor(Math.random() * aiNames.length)];
turn = Math.floor(Math.random() * 1);
}
</script>
</body>
</head>
</html>