Added code to handle game over for both single player and multiplayer games