I have created a game that avoids the The following is the program.
Code Description:
-To display players and missiles on the screen、Create the span element with JavaScript and、It is added to the BODY element.
Using --setInterval、The process of dropping missiles at regular intervals is implemented.
-In response to keystroke input、The process of moving the player left or right is implemented.
-Collision between the missile and the player is determined.、If a collision occurs, the game is over.