My array only deploys one image i would like it to display 52 card images each one twice and selected randomly
is anyone able to point me in the right direction
Thanks
namespace FinalPairsGame
{
public partial class Background : Form
{
// global decalrations
int[,] memoryarray = new int[6, 6];
GImageArray controlarray;
string imagepath = Directory.GetCurrentDirectory() + "\\Cards\\";
public Background()
{
InitializeComponent();
}
private void newToolStripMenuItem_Click(object sender, EventArgs e)
{
initgame();
pictureBox1.Hide();
Title.Hide();
}
private void helpToolStripMenuItem_Click(object sender, EventArgs e)
{
inithelp();
}
private void inithelp()
{
MessageBox.Show("Pairs, the aim of the game is to match 2 cards in the grid, each player will take it in turns to find a pair, once the card pair has been found it will turn blue. The winner is the player who ends with the most pairs");
}
public void initgame()
{
for (int row = 0; row < 6; row++)
{
for (int col = 0; col <6;col++)
{
memoryarray[row, col] = 1;
if (memoryarray[row, col] == 1)
{
;
}
}
}
controlarray = new GImageArray(this, memoryarray, 35, 200, 10, 200, 10, imagepath);
controlarray.Which_Element_Clicked += new GImageArray.ImageClickedEventHandler(Which_Element_Clicked);
}
private void Which_Element_Clicked(object sender, EventArgs e)
{
int row = controlarray.Get_Row(sender);
int col = controlarray.Get_Col(sender);
}
private void assigncardstogrid()
{
}
}
}
I tried messing around with it but could never get further than one card and yeah not sure how to fix this would appreciate it if someone could help me out