private void UpdateScoreDisplays() { lblOppPointsTotal.Text = $"Points Total: {driver.GetAIPlayer().Score}"; lblOppMadnessTotal.Text = $"Madness Total: {driver.GetAIPlayer().MadnessTotal}"; lblOppMadnessThisRound.Text = $"Madness This Round: {driver.GetAIPlayer().MadnessThisRound}"; lblPlayerPointsTotal.Text = $"Points Total: {driver.GetHumanPlayer().Score}"; lblPlayerMadnessTotal.Text = $"Madness Total: {driver.GetHumanPlayer().MadnessTotal}"; lblPlayerMadnessThisRound.Text = $"Madness This Round: {driver.GetHumanPlayer().MadnessThisRound}"; }
private void TidesOfMadnessForm_Load(object sender, EventArgs e) { driver = new GameDriver(); driver.InitializeGame(); UpdateGameLog(driver.GetGameLog()); UpdateScoreDisplays(); pbxCardImage.SizeMode = PictureBoxSizeMode.StretchImage; lbxHumanHand.DataSource = driver.GetHumanPlayer().GetCardsInHand(); lbxHumanHand.DisplayMember = "CardNameDisplay"; lbxHumanInPlay.DataSource = driver.GetHumanPlayer().GetCardsInPlay(); lbxHumanInPlay.DisplayMember = "CardNameDisplay"; lbxOppInPlay.DataSource = driver.GetAIPlayer().GetCardsInPlay(); lbxOppInPlay.DisplayMember = "CardNameDisplay"; lbxDiscardPile.DataSource = driver.GameState.DiscardPile.CardsInCollection; lbxDiscardPile.DisplayMember = "CardNameDisplay"; pbxCardImage.ImageLocation = SetArtFromListBox(lbxHumanHand, 0); UpdatePlayerInstructions(driver.GetCurrentGameState(), lblPlayerInstructions); UpdateUISettings(driver.GetCurrentGameState()); }