public Boolean Attack(Orc anOrc) { if (myD20.Roll() >= 13) { return(hit(anOrc)); } else { return(miss()); } }
public void RollTest() { List <int> rollResults = new List <int>(); IRollable d = DiceFactory.CreateD10(); for (int i = 0; i < 100000000; i++) { rollResults.Add(d.Roll()); } Assert.AreEqual(rollResults.Count, 100000000, "Count is " + rollResults.Count.ToString()); }
public static List <int> SetUp1000000Results(this IRollable rollable) { var rollableResults = new List <int>(); for (int i = 0; i < 1000000; i++) { int result = rollable.Roll(); rollableResults.Add(result); } return(rollableResults); }
public void Run() { rollableTarget.Roll(); }