Hey guys,
I needhelp with accessing imagelists from other classes; I'm making a card game so I need to be able to shift "cards" to other imagelists from different classes e.g. a click method. How do I connect the classes? I have left some simplified code to
help you out:
public partial class frmMain : Form
{
//On the Load of the Form
public void Form1_Load(object sender, EventArgs e)
{
//Initialising Imagelists
ImageList hand_P1 = new ImageList();
ImageList tableCards = new ImageList();
}
//If a player wants to put down a card
private void btnFold_P1_Click(object sender, EventArgs e)
{
//Taking a card from player 1's hand to the table
hand_P1.RemoveAt(randomNumberHand1_P1);
tableCards.Add(randomNumberHand1_P1);
}
}