public TestRecipe ( IRecipe recipe ) : float | ||
recipe | IRecipe | |
Résultat | float |
public float TestRecipe(IRecipe recipe)
{
float result = 0.0f;
var sp = new RecipeGroups (recipe.GetGroups ());
foreach (var permutation in _resultPermutations) {
var match = sp.TestMatch (permutation);
if (match > 0) {
result = Math.Max (result, match);
}
}
return result;
}
void HandleTournamentEnd() { foreach (var component in _components) { PSDebug.Log ("Component: {0}", component.Recipe.ID ()); } var groups = _components .Select (match => new WeightedValue ( TypeForComponent (match.Component), match.Recipe.Group, match.Quality )) .ToList (); var evaluator = new RecipeEvaluator (groups, SupplementForPiza); var pizzaMatch = evaluator.TestRecipe (_pizzaDefinition); PSDebug.Log ("pizza match is: {0}", pizzaMatch); GameController.Instance.PizzaMatch = pizzaMatch; Application.LoadLevel(1); }