Exemple #1
0
        static void Main(string[] args)
        {
            Knight knight = new Knight();
            Mage   mage   = new Mage();

            EnterGame(mage);
        }
Exemple #2
0
        static void Main(string[] args)
        {
            Knight knight = new Knight();
            Mage   mage   = new Mage();

            knight.Move();
            mage.Move();
        }
Exemple #3
0
        static void EnterGame(Player player)
        {
            player.Move();

            Mage mage = (player as Mage);

            if (mage != null)
            {
                mage.mp = 10;
            }
        }
Exemple #4
0
        static void EnterGame(Player player)
        {
            Mage mage = (player as Mage);

            if (mage != null)
            {
                mage.mp = 10;
                mage.Move();
            }

            Knight knight = (player as Knight);

            if (mage != null)
            {
                knight.Move();
            }
        }