1.)
PANEL* clickers[2];
function change(PANEL* clicked_panel)
{
if(clickers[0] == NULL)
{
clickers[0] = clicked_panel;
}
else if(clickers[0] != NULL && clickers[0] != clicked_panel)//clickers[0] already contains a Panel, and it´s other than the now clicked
{
clickers[1] = clicked_panel;
//Add the Changing code here
// Changing position of clickers[0] and clickers[1]
//end of changing code
clickers[0] = NULL;
}
}
i think that should work.
2.)
give each Panel at creating a skill.. like that:
panname = pan_create(..);
panname.skill_x = 1
now you can say:
skill_x == 1 is 1st Pic
skill_x == 2 is 2nd Pic
skill_x == 3 is 3rd Pic
skill_x == 4 is 4th Pic
...etc..etc..
Now run thorugh your lines with a loop, and ask if 3 or more skill_xs in a row are the same