make some awesome similar looking game based on this code, but make enemy autonomous sneaking before the player and shooting lazors as some kind of arkanoid.: const canvas=document.getElementById("game-canvas");const context=canvas.getContext("2d");canvas.width=800;canvas.height=600;const GRAVITY=80;const ENEMY_RADIUS=25;const PLAYER_RADIUS=25;const TRACTION=.95;let playerX=50;let playerY=550;let enemyX=750;let enemyY=150;let enemySpeedX=0;let enemySpeedY=0;let playerSpeedX=0;let playerSpeedY=0;let playerIsOnGround=false;let paths=[];let nodes=[];class Node{constructor(x,y){this.x=x;this.y=y;this.neighbors=[]}distanceTo(otherNode){return Math.sqrt((otherNode.x-this.x)**2+(otherNode.y-this.y)**2)}}function generateNodes(){nodes=[];for(let i=0;i<canvas.width;i+=50){for(let j=0;j<canvas.height;j+=50){const node=new Node(i+25,j+25);nodes.push(node)}}nodes.forEach((node,index)=>{const neighbors=nodes.filter((otherNode,otherIndex)=>{if(otherIndex===index)return false;return node.distanceTo(otherNode)<75});node.neighbors=neighbors})}function heuristic(nodeA,nodeB){return Math.abs(nodeA.x-nodeB.x)+Math.abs(nodeA.y-nodeB.y)}function findPath(startNode,endNode){let openSet=[startNode];let cameFrom={};let gScore={};nodes.forEach(node=>gScore[node.x+"-"+node.y]=Infinity);gScore[startNode.x+"-"+startNode.y]=0;let fScore={};nodes.forEach(node=>fScore[node.x+"-"+node.y]=Infinity);fScore[startNode.x+"-"+startNode.y]=heuristic(startNode,endNode);while(openSet.length>0){openSet.sort((a,b)=>fScore[a.x+"-"+a.y]-fScore[b.x+"-"+b.y]);let current=openSet.shift();if(current===endNode){let path=[];let temp=current;path.push(temp);while(cameFrom[temp.x+"-"+temp.y]){path.unshift(cameFrom[temp.x+"-"+temp.y]);temp=cameFrom[temp.x+"-"+temp.y]}return path}current.neighbors.forEach(neighbor=>{if(gScore[current.x+"-"+current.y]+1<gScore[neighbor.x+"-"+neighbor.y]){cameFrom[neighbor.x+"-"+neighbor.y]=current;gScore[neighbor.x+"-"+neighbor.y]=gScore[current.x+"-"+current.y]+1;fScore[neighbor.x+"-"+neighbor.y]=gScore[neighbor.x+"-"+neighbor.y]+heuristic(neighbor,endNode);if(!openSet.includes(neighbor)){openSet.push(neighbor)}}})}return null}function applyGravity(){if(!playerIsOnGround){playerSpeedY+=GRAVITY/60}}function drawNodes(){context.fillStyle="rgba(0, 255, 0, 0.5)";nodes.forEach(node=>{context.beginPath();context.arc(node.x,node.y,5,0,Math.PI*2);context.fill()})}function applyTraction(){playerSpeedX*=TRACTION}function movePlayer(){playerX+=playerSpeedX;playerY+=playerSpeedY;if(playerX<0){playerX=0}if(playerX+PLAYER_RADIUS*2>canvas.width){playerX=canvas.width-PLAYER_RADIUS*2}context.fillStyle="pink";context.fillRect(playerX,playerY,PLAYER_RADIUS*2,PLAYER_RADIUS*2)}function moveEnemy(){if(paths.length>0){const path=paths[0];const followNode=path.shift();const theta=Math.atan2(followNode.y-enemyY,followNode.x-enemyX);enemySpeedX=Math.cos(theta)*5;enemySpeedY=Math.sin(theta)*5;enemyX+=enemySpeedX;enemyY+=enemySpeedY;if(path.length===0){paths.shift()}}context.fillStyle="cyan";context.fillRect(enemyX-ENEMY_RADIUS,enemyY-ENEMY_RADIUS,ENEMY_RADIUS*2,ENEMY_RADIUS*2)}function checkCollision(){let isOnGround=false;if(playerY+PLAYER_RADIUS*2>=canvas.height){playerSpeedY=0;playerY=canvas.height-PLAYER_RADIUS*2;playerIsOnGround=true;isOnGround=true}if(playerY<=0){playerSpeedY=0;playerY=0}if(!isOnGround){playerIsOnGround=false}}function draw(){context.clearRect(0,0,canvas.width,canvas.height);context.fillStyle="black";context.fillRect(0,0,canvas.width,canvas.height);drawNodes();applyGravity();applyTraction();movePlayer();moveEnemy();checkCollision();requestAnimationFrame(draw)}function findClosestNode(x,y){let closestNode=null;let closestDistance=Infinity;nodes.forEach(node=>{const distance=node.distanceTo({x:x,y:y});if(distance<closestDistance){closestNode=node;closestDistance=distance}});if(closestDistance<50){return closestNode}return null}generateNodes();draw();canvas.addEventListener("click",event=>{const rect=canvas.getBoundingClientRect();const x=event.clientX-rect.left;const y=event.clientY-rect.top;const closestNode=findClosestNode(x,y);if(closestNode){const playerNode=findClosestNode(playerX+PLAYER_RADIUS,playerY+PLAYER_RADIUS);const path=findPath(playerNode,closestNode);if(path){paths.push(path)}}});document.addEventListener("keydown",event=>{if(event.code==="KeyA"){playerSpeedX=-5}if(event.code==="KeyD"){playerSpeedX=5}if(event.code==="KeyW"&&playerIsOnGround){playerSpeedY=-20;playerIsOnGround=false}});document.addEventListener("keyup",event=>{if(event.code==="KeyA"||event.code==="KeyD"){playerSpeedX=0}});                                        <!DOCTYPE html>
<html>
  <head>
    <title>Canvas Game</title>
    <style>
      canvas {
        display: block;
        margin: 0 auto;
      }
    </style>
  </head>
  <body>
    <canvas id="game-canvas"></canvas>
    <script src="game.js"></script>
  </body>
</html>