I worked on a ping pong game
This is part of the code
window.listen()
window.onkeypress(p1_move_up, "w")
window.onkeypress(p1_move_down, "s")
window.onkeypress(p2_move_up, "Up")
window.onkeypress(p2_move_down, "Down")
This is a code for controls of the player
Leave a Reply