Skip to content

Instantly share code, notes, and snippets.

@onlyshk
Created November 4, 2010 15:04
Show Gist options
  • Save onlyshk/662588 to your computer and use it in GitHub Desktop.
Save onlyshk/662588 to your computer and use it in GitHub Desktop.
//
//***************************************************
// y - left
//***************************************************
//
int l1,l2 = 0;
x = 0;
y = 0;
k = 0;
z = 0;
s = 0;
x = (int)(e->y() / 40);
y = (int)(e->x() / 40);
l1 = y;
l2 = y;
if (field[x][y] != field[x][y - 1] && fields[x][y - 1].checked)
{
l1 = l1 - 1;
while (l1 > -1)
{
if (field[x][l1] == field[x][y])
{
s = l1;
break;
}
l1--;
}
while (--l2 > s)
{
field[x][l2] = field[x][y];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment