예제 #1
0
        static void Main(string[] args)
        {
            Character aKing = new King();
            aKing.whoAreYou();
            aKing.fight();

            Character aQueen = new Queen();
            aQueen.whoAreYou();
            aQueen.fight();

            Character anArcher = new Archer();
            anArcher.whoAreYou();
            anArcher.fight();

            Character aKnight = new Knight();
            aKnight.whoAreYou();
            aKnight.fight();

            aKnight.setWeapon(new KnifeBehavior());
            aKnight.fight();
        }