Add game end check, not perfect