static void Verify2(Cost cost, List<ResourceEffect> cityResources, List<ResourceEffect> leftResources, List<ResourceEffect> rightResources, ResourceManager.CommercePreferences pref, ResourceManager.CommerceEffects commerceEffects, CommerceOptions expectedResult) { ResourceManager resMan = new ResourceManager(); cityResources.ForEach(x => { resMan.add(x); }); resMan.SetCommerceEffect(commerceEffects); CommerceOptions co = resMan.CanAfford(cost, leftResources, rightResources, pref); Verify(co.bAreResourceRequirementsMet == expectedResult.bAreResourceRequirementsMet); Verify(co.bankCoins == expectedResult.bankCoins); Verify(co.leftCoins == expectedResult.leftCoins); Verify(co.rightCoins == expectedResult.rightCoins); }
void CreateDag(ResourceManager d, string sourceStr) { string[] playerEffectsSplit = sourceStr.Split(','); for (int i = 0; i < playerEffectsSplit.Length; ++i) { d.add(new ResourceEffect( playerEffectsSplit[i].Length <= 2, // only resource effects of length 1 or 2 can be used by neighbors playerEffectsSplit[i])); } }