Line 46: drop the parens on
paddle_a_up
. Why? Because having the parens means calling the function and then the return value is passed to onkeypress
, which isn't what you want to do. Instead, you want to pass the function itself to onkeypress
, so that it can be called when the relevant key is pressed.