Refactored win logic, thanks Brant