static void Main(string[] args) { Character character = new Knight(); character.Fight(); character.SetWeapon(new BowAndArrowBehavior()); character.Fight(); character = new King(); character.Fight(); character.SetWeapon(new KnifeBehavior()); character.Fight(); }
static void Main(string[] args) { Character knight = new Knight(); Character troll = new Troll(); knight.Fight(); troll.Fight(); Console.ReadKey(); }