示例#1
0
文件: Program.cs 项目: wsxx111/Work
        static void Main(string[] args)
        {
            Player_A p1 = new Player_A(20, "张三", true);
            Player_B p2 = new Player_B(20, "李四", false);
            Player_C p3 = new Player_C(20, "王五", false);

            Middle m = new Middle(p1, p2, p3);

            //开始游戏
            p1.WinMoney(1, m);
            p2.WinMoney(1, m);
            p2.WinMoney(1, m);
            p1.WinMoney(1, m);
            p3.WinMoney(1, m);
            p2.WinMoney(1, m);

            Console.WriteLine(p1.Money);
            Console.WriteLine(p2.Money);
            Console.WriteLine(p3.Money);
            Console.WriteLine(p1.Wincount);
            Console.WriteLine(p2.Wincount);
            Console.WriteLine(p3.Wincount);

            Console.ReadKey();
        }
示例#2
0
 public abstract void WinMoney(decimal m, Middle mid);
示例#3
0
文件: Player_A.cs 项目: wsxx111/Work
 public override void WinMoney(decimal m, Middle mid)
 {
     Wincount++;
     mid.winA(m);
 }