game.js
game.js
drawPlayer();
drawObstacles();
moveObstacles();
checkCollisions();
// Mostrar la puntuación
ctx.fillStyle = "#FFF";
ctx.font = "20px Arial";
ctx.fillText("Puntuación: " + score, 10, 30);
requestAnimationFrame(gameLoop);
}
// Comenzar el juego
gameLoop();