private readonly MilkRunGameContainer _gameContainer; //if not needed, delete. public MilkRunMainViewModel(CommandContainer commandContainer, MilkRunMainGameClass mainGame, MilkRunVMData viewModel, BasicData basicData, TestOptions test, IGamePackageResolver resolver, MilkRunGameContainer gameContainer ) : base(commandContainer, mainGame, viewModel, basicData, test, resolver) { _mainGame = mainGame; _model = viewModel; _gameContainer = gameContainer; _model.Deck1.NeverAutoDisable = true; _model.PlayerHand1.Maximum = 8; }
public void LoadPiles(MilkRunMainGameClass mainGame, MilkRunGameContainer gameContainer) { _mainGame = mainGame; _gameContainer = gameContainer; StrawberryPiles = new BasicMultiplePilesCP <MilkRunCardInformation>(_gameContainer.Command, _mainGame.Aggregator); StrawberryPiles.PileClickedAsync += StrawberryPiles_PileClickedAsync; StrawberryPiles.Rows = 1; StrawberryPiles.Columns = 3; StrawberryPiles.HasText = true; StrawberryPiles.HasFrame = true; //i don't think we need to prove true anymore. StrawberryPiles.Style = BasicMultiplePilesCP <MilkRunCardInformation> .EnumStyleList.HasList; StrawberryPiles.LoadBoard(); //hopefully i don't have to send enables for true. int x = 0; StrawberryPiles.PileList !.ForEach(thisPile => { x++; thisPile.IsEnabled = true; if (x == 1) { thisPile.Text = "S. Limit"; } else if (x == 2) { thisPile.Text = "S. Go"; } else if (x == 3) { thisPile.Text = "S #."; if (PlayerCategory != EnumPlayerCategory.Self) { thisPile.IsEnabled = false; } } else { throw new BasicBlankException("There should only be 3 piles for strawberries"); } }); ChocolatePiles = new BasicMultiplePilesCP <MilkRunCardInformation>(_gameContainer.Command, _mainGame.Aggregator); ChocolatePiles.PileClickedAsync += ChocolatePiles_PileClickedAsync; x = 0; ChocolatePiles.Rows = 1; ChocolatePiles.Columns = 3; ChocolatePiles.HasText = true; ChocolatePiles.HasFrame = true; ChocolatePiles.Style = BasicMultiplePilesCP <MilkRunCardInformation> .EnumStyleList.HasList; ChocolatePiles.LoadBoard(); ChocolatePiles.PileList !.ForEach(thisPile => { x++; thisPile.IsEnabled = true; if (x == 1) { thisPile.Text = "C. Limit"; } else if (x == 2) { thisPile.Text = "C. Go"; } else if (x == 3) { thisPile.Text = "C #."; if (PlayerCategory != EnumPlayerCategory.Self) { thisPile.IsEnabled = false; } } else { throw new BasicBlankException("There should only be 3 piles for chocolate"); } }); _thisE = mainGame.MainContainer.Resolve <EventAggregator>(); }