using uCalcSoftware;

var uc = new uCalc();
var t = uc.NewTransformer();
var ruleA = t.FromTo("a", "A");

// Case 1: Limit is 2, but 3 'a's are present. The rule is invalidated.
t.Transform("a b a c a");
ruleA.Maximum = 2;
Console.WriteLine("--- Maximum = 2 (Rule Fails) ---");
Console.Write("Result: ");
Console.WriteLine(t.Transform("a b a c a"));

// Case 2: Limit is 3. The rule passes and matches are kept.
ruleA.Maximum = 3;
Console.WriteLine("");
Console.WriteLine("--- Maximum = 3 (Rule Succeeds) ---");
Console.Write("Result: ");
Console.WriteLine(t.Transform("a b a c a"));