implement 'game over' check