I’m making a Bejeweled game and i’m getting some isseus.
The problem that i am working on now is that when i have selected 2 diamonds they need to swap positions.
I am making pictureboxes with randomly images inside of them(1 to 7 colors).
when i know the color i am making a picturebox for it
switch (diamant)
{
case "1":
dia = new Diamant(this, "Rood", XWaarde, YWaarde, new Point(XWaarde, YWaarde));
break;
case "2":
dia = new Diamant(this, "Groen", XWaarde, YWaarde, new Point(XWaarde, YWaarde));
break;
case "3":
dia = new Diamant(this, "Geel", XWaarde, YWaarde, new Point(XWaarde, YWaarde));
break;
case "4":
dia = new Diamant(this, "Paars", XWaarde, YWaarde, new Point(XWaarde, YWaarde));
break;
case "5":
dia = new Diamant(this, "Wit", XWaarde, YWaarde, new Point(XWaarde, YWaarde));
break;
case "6":
dia = new Diamant(this, "Oranje", XWaarde, YWaarde, new Point(XWaarde, YWaarde));
break;
case "7":
dia = new Diamant(this, "Blauw", XWaarde, YWaarde, new Point(XWaarde, YWaarde));
break;
}
I save them in a list and from there i want to change them from position i know which x and y position they both have.
But dont know how i need to start this swapping.
Somebody can give me a idea to swap them.
or is it better to make 64 (8 X 8) pictureboxes and than fill them with a color?
kind regards,
Maikel
Or maybe I don’t understand your question.
Okay..