public static RecipeInfo Modify(this RecipeModifier modifier, RecipeInfo cheeseType)
 {
     if (modifier == null)
     {
         return(cheeseType);
     }
     return(new RecipeInfo(modifier.Name + " " + cheeseType.Name, Math.Sign(cheeseType.Points) * modifier.Points + cheeseType.Points));
 }
 public static Boolean TryGetNextToUnlock(
     this IReadOnlyList <RecipeModifier> repository,
     Player player,
     out RecipeModifier cheeseModifier)
 {
     // The default modifier is null, the 0th element of the repository,
     // which is always a possibility.
     // We add 1 to ensure this can be picked.
     return(repository.TryGet((Int32)(player.NextCheeseModifierUpgradeUnlock + 1), out cheeseModifier));
 }
 public static Int32 GetPoints(this RecipeModifier modifier, Player player)
 {
     return(player.GetModifiedPoints(modifier.Points));
 }