This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuoteVariable '::' is already defined
struct coordinates
{
int x;
int y;
bool used;
};
import coordinates Point[15];
struct mem //in that struct you can add your functions for pair checking etc.
{
import void mix();
};
import mem Memory;
coordinates Point[15];
export Point;
mem Memory; //on top
export Memory;
mem::mix()
{
int i;
while (i < 15) { //reseting memory
Point[i].used = false;
i++;
}
i = 0;
int pos;
while (i < 15) { //mixing the tiles
pos = Random (15-1);
if (!Point[pos].used)
{
Point[pos].used = true;
object[i].SetPosition(Point[pos].x, Point[pos].y);
i++;
}
}
}
Point[0].x = 60;
Point[0].y = 50;
Point[1].x = 110;
Point[1].y = 50;
Point[2].x = 160;
Point[2].y = 50;
Point[3].x = 210;
Point[3].y = 50;
Point[4].x = 60;
Point[4].y = 100;
Point[5].x = 110;
Point[5].y = 100;
Point[6].x = 160;
Point[6].y = 100;
Point[7].x = 210;
Point[7].y = 100;
Point[8].x = 60;
Point[8].y = 150;
Point[9].x = 110;
Point[9].y = 150;
Point[10].x = 160;
Point[10].y = 150;
Point[11].x = 210;
Point[11].y = 150;
Point[12].x = 60;
Point[12].y = 200;
Point[13].x = 110;
Point[13].y = 200;
Point[14].x = 160;
Point[14].y = 200;
Point[15].x = 210;
Point[15].y = 200;
Memory.mix();
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.058 seconds with 13 queries.