コード例 #1
0
        static void Main(string[] args)
        {
            Kost  kubik = new Kost();
            Gamer g1    = new Gamer("Иван");

            Console.WriteLine("Выпало очков {0} для игрока {1}", g1.SeansGame(kubik), g1.ToString());
            Monet mon  = new Monet();
            IGame bmon = new AdapterGame(mon);

            Console.WriteLine("Монета показала \"{0}\" для игрока {1}", g1.SeansGame(bmon), g1.ToString());
        }
コード例 #2
0
        static void Main(string[] args)
        {
            Kost  kost = new Kost();
            Gamer g1   = new Gamer("Ivan");

            Console.WriteLine("You have {0} points for player {1}", g1.SeansGame(kost), g1.ToString());

            Monet mon  = new Monet();
            IGame bmon = new AdapterGame(mon);

            Console.WriteLine("Coin show \"{0}\" for player {1}", g1.SeansGame(bmon), g1.ToString());
        }