(slots[0][0]==slots[0][1] && slots[0][0]==slots[0][2])
for(i=0;i<8;i++)
{
switch(prizes[i])
{
case 0: // nothing
break;
case 1: // island
score+=50;
break;
case 2: // bell
score+=20;
break;
case 3: // hand
score+=10;
break;
}
}
int i;
int prizes[5];
//horizontal
prizes[0]=(slots[0][0]==slots[0][1] && slots[0][0]==slots[0][2])*slots[0][0];
prizes[1]=(slots[1][0]==slots[1][1] && slots[1][0]==slots[1][2])*slots[1][0];
prizes[2]=(slots[2][0]==slots[2][1] && slots[2][0]==slots[2][2])*slots[2][0];
//diagonal
prizes[3]=(slots[0][0]==slots[1][1] && slots[0][0]==slots[2][2])*slots[0][0];
prizes[4]=(slots[2][0]==slots[1][1] && slots[2][0]==slots[0][2])*slots[2][0];
for(i=0;i<5;i++)
{
switch(prizes[i])
{
case 0: // nothing
break;
case 1: // island
score+=50;
break;
case 2: // bell
score+=20;
break;
case 3: // hand
score+=10;
break;
}
}
animpos=rand(3);
animpos=rand(nframes);
for(i=0;i<5;i++)
{
switch(prizes[i])
{
case 0: // nothing
break;
case 1: // island
score+=50;
break;
case 2: // bell
score+=20;
break;
case 3: // hand
score+=10;
break;
case 4: // new
score+=5; // or whatever you want it to be
break;
}
}
Users browsing this forum: No registered users and 1 guest