Пример #1
0
        public static void ReDo(Casino casino, ProxyWallet bal, iAccount acc)
        {
            bool flag = true;

            while (flag)
            {
                Console.WriteLine("What ammount of money do you want to bet: ");
                decimal sum = bal.Withdraw(decimal.Parse(Console.ReadLine()));

                Console.WriteLine(
                    "What type of bet?(1 - Manque, 2 - Passe, 3 - Rouge, 4 - Noire, 5 - Pair, 6 - Impair, default - digit)");
                int t = int.Parse(Console.ReadLine());

                (casino.roulette as RouletteMachine)?.Add(acc.wallet.Withdraw(sum));

                Console.WriteLine("Roulette spinning");
                (casino.roulette as RouletteMachine).Work(t);
                casino.roulette.Spin();

                casino.accounts.Find(n => n.Login.Equals(acc.Login)).wallet.AddMoney(casino.roulette.Withdraw());

                Console.WriteLine("\nYou current money: " + (casino.roulette as RouletteMachine)._sum);

                Console.WriteLine("\nDo you want to continue?( y/n )");
                string answ = Console.ReadLine();

                if (answ.ToLower().Equals("y"))
                {
                    flag = true;
                }
                else
                {
                    flag = false;
                }
            }

            acc.wallet.AddMoney(casino.roulette.Withdraw());
        }
Пример #2
0
 public EUR_Account_Decorator(iAccount acc) : base(acc)
 {
 }
Пример #3
0
 public RUB_Account_Decorator(iAccount acc) : base(acc)
 {
 }
Пример #4
0
 public UAH_Account_Decorator(iAccount acc) : base(acc)
 {
 }
Пример #5
0
 public AccountDecorator(iAccount acc)
 {
     this.Account = acc;
 }
Пример #6
0
 public override void Remove(iAccount acc)
 {
     accounts.Remove(acc);
 }
Пример #7
0
 public override void Register(iAccount acc)
 {
     accounts.Add(acc);
 }
Пример #8
0
 public abstract void Remove(iAccount acc);
Пример #9
0
 public abstract void Register(iAccount acc);