/// <summary> /// Loads and displays the pictureboxes into the computer table layout /// panel /// </summary> private void DisplayCHand() { CompPanel.Controls.Clear(); Hand cHand = Crazy_Eights_Game.GetComputerHand(); int handSize = cHand.GetCount(); for (int i = 0; i < handSize; i++) { CompPanel.Controls.Add(computerPBox[i]); } }
/// <summary> /// updates picture boxes for the computer based on the current /// computers hand /// </summary> private void UpdateCHand() { PictureBox pBox; Hand cHand = Crazy_Eights_Game.GetComputerHand(); int handSize = cHand.GetCount(); for (int i = 0; i < handSize; i++) { Card card = cHand.GetCard(i); pBox = new PictureBox(); pBox.SizeMode = PictureBoxSizeMode.AutoSize; pBox.Dock = DockStyle.Fill; pBox.Image = Images.GetCardImage(card); computerPBox[i] = pBox; } }