예제 #1
0
        public GameViewModel(IView view, string name)
        {
            View     = view;
            Random   = new Random();
            Commands = new Models.Commands(this);

            Player = new Player(name, 1000, ImagesHelper.CreateImage("player"), 2);
            Player.CreateSplitDeck();
            view.AddSplitDeckCards(Player);
            Computer = new Player("Computer", 1000, ImagesHelper.CreateImage("computer"), 2);
            view.DisplayMoney(Player, Computer);
            view.DisplayName(name);

            CardImages = ImagesHelper.GetBlackJackCards();
            view.AddCards(Player, Computer);
            Player.ShowBackside();
            Computer.ShowBackside();
            BetAmount = "100";
        }
예제 #2
0
        public GameViewModel(IView view, string name)
        {
            View = view;
            Random = new Random();
            Commands = new Models.Commands(this);

            Player = new Player(name, 1000, ImagesHelper.CreateImage("player"), 2);
            Player.CreateSplitDeck();
            view.AddSplitDeckCards(Player);
            Computer = new Player("Computer", 1000, ImagesHelper.CreateImage("computer"), 2);
            view.DisplayMoney(Player, Computer);
            view.DisplayName(name);

            CardImages = ImagesHelper.GetBlackJackCards();
            view.AddCards(Player, Computer);
            Player.ShowBackside();
            Computer.ShowBackside();
            BetAmount = "100";
        }
예제 #3
0
 public NinjectRegistrations(Models.Commands command) => _command = command;