示例#1
0
 private void dealFromBank(string resource, int amount, Hand hand)
 {
     hand.modifyResources(resource, amount);
     bank.modifyResource(resource, -amount);
 }
 public void TestThatResourcesGetModified()
 {
     Hand hand = new Hand();
     hand.modifyResources("ore", 3);
     Assert.AreEqual(3, hand.getOre());
     hand.modifyResources("wool", 2);
     Assert.AreEqual(2, hand.getWool());
     hand.modifyResources("lumber", 12);
     Assert.AreEqual(12, hand.getLumber());
     hand.modifyResources("grain", 33);
     Assert.AreEqual(33, hand.getGrain());
     hand.modifyResources("brick", 102);
     Assert.AreEqual(102, hand.getBrick());
 }