game over function and can restart the game