Move testwin logic into board