add game over and history recording