public void ShouldBeCorrespondingTypeWhenBuilt(int which, Type type) { powerDownFactory = new PowerDownFactory(); var obj = powerDownFactory.Build(which, new Coordinates()); Assert.IsInstanceOfType(obj, type); }
public static Pickable GetRandom(Coordinates xy) { switch (new Random().Next(0, 2)) { case 0: { var fc = new PowerDownFactory(); return(fc.GetRandom(xy)); } case 1: { var fc = new PowerUpFactory(); return(fc.GetRandom(xy)); } default: return(null); } }