Refactored winning conditions