body {
margin: 0;
background-color: #333;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
canvas {
border: 2px solid white;
}
const canvas = document.getElementById("gameCanvas");
const ctx = canvas.getContext("2d");
const carWidth = 50;
const carHeight = 100;
const roadWidth = 400;
const roadX = (canvas.width - roadWidth) / 2;
let carX = (canvas.width - carWidth) / 2;
let score = 0;
let laps = 0;
let rounds = 0;
function drawCar() {
ctx.fillStyle = "red";
ctx.fillRect(carX, canvas.height...