Added end-game conditions