win logic.