up arrow key
For upward movement of paddle.down arrow key
For downward movement of paddle.
You can let bot control the paddle by adding paddle.activatebot(ball, isLeft)
and reomoving paddle.checkInp(event.key, isKeyDown)
from game loop.
- Where
ball
is object ofBall
Class isLeft
is a boolean whether the paddle is Left paddle of not.