コード例 #1
0
ファイル: Program.cs プロジェクト: zhwtf/DesignPatternExample
        static void Main(string[] args)
        {
            Player b = new Forwards("巴蒂爾");

            b.Attack();

            Player m = new Guards("麥克格雷迪");

            m.Attack();

            //Player ym = new Center("姚明");
            Player ym = new Translator("姚明");

            ym.Attack();
            ym.Defense();

            Console.Read();
        }
コード例 #2
0
        static void Main(string[] args)
        {
            Player b = new Forwards("巴蒂爾");
            b.Attack();

            Player m = new Guards("麥克格雷迪");
            m.Attack();

            //Player ym = new Center("姚明");
            Player ym = new Translator("姚明");
            ym.Attack();
            ym.Defense();

            Console.Read();
        }