Learn Create Your Own Split Screen

Next Page

The next important step is that user-input should do different things depending on the game_mode.
function Got_Player_Input(MyEvent) { switch (game_mode) { case 'prestart': { game_mode = 'running'; break; } case 'running': { bird.velocity_y = jump_amount; break; } case 'over': { reset_game(); game_mode = 'running'; break; } } // switch MyEvent.preventDefault(); }
Hopefully you can see that the English description pretty much matches the code one-for-one.

The reset_game function doesn't exist yet. That's next.