Create a game where flappy is the ball and the bats are the paddles. Part of the game has been created for you. You need to finish the game. We will be updating the Loop() function.
Score: 0//draw top bat image (top) ctx.drawImage(imgBat,playerX,0);
//move the player's bat with the move playerX = mouseX;
//draw computer's bat image (bottom) ctx.drawImage(imgBat,computerX,500);
//move the computer toward the ball if(x < computerX + 100){ computerX = computerX - 2; }else{ computerX = computerX + 2; }
//bounce off buttom wall if(y > 550) { yVol = yVol *-1; score = score +1; }
//bounce off left wall if(x < 0) { xVol = xVol *-1; playBounce(); }