// Generate ConstraintMC public override ConstraintMC generate_ConstraintMC(SnapViewDirector svd) { Field f = svd.findInDict(FieldDictionary.fname_homeAway); HomeAwayConstraintAdapter adapter = new HomeAwayConstraintAdapter(f, IsHome); return(new ConstraintMC(svd, adapter.adaptee)); }
// Generate ConstraintMC public override ConstraintMC generate_ConstraintMC(SnapViewDirector svd) { // This should not be hardcoded - but factored out Field f = svd.findInDict(FieldDictionary.fname_minsPlayed); MinsPlayedConstraintAdapter adapter = new MinsPlayedConstraintAdapter(f, val); return(new ConstraintMC(svd, adapter.adaptee)); }
// Generate ConstraintMC public override ConstraintMC generate_ConstraintMC(SnapViewDirector svd) { Field f = svd.findInDict(FieldDictionary.fname_Gameweek); // Adapter needed to convert ints to strings GameweekConstraintAdapter adapter = new GameweekConstraintAdapter(f, min, max); return(new ConstraintMC(svd, adapter.adaptee)); }