Move win logic to model