Lenght commit message fixed as been fixed
This commit is contained in:
1 parent
586c152da4
commit
78960c6ef9
1 file changed
+6
-4
@@ -198,8 +198,9 @@ void game_update_flags(game g) {
|
|||||||
if (/* test if both tab are not 0*/ tab[y] != tab[y + 1] &&
|
if (/* test if both tab are not 0*/ tab[y] != tab[y + 1] &&
|
||||||
(/* normal check */ (j + x * tab[y + 1] >= 0 && j + x * tab[y + 1] < g->width && i + x * tab[y] >= 0 &&
|
(/* normal check */ (j + x * tab[y + 1] >= 0 && j + x * tab[y + 1] < g->width && i + x * tab[y] >= 0 &&
|
||||||
i + x * tab[y] < g->height) ||
|
i + x * tab[y] < g->height) ||
|
||||||
/* wrapping check*/ (
|
/* wrapping check*/ (g->wrapping &&
|
||||||
g->wrapping && !((((i + g->height + x * tab[y]) % g->height) == i) && (((j + g->width + x * tab[y + 1]) % g->width) == j))))) {
|
/*not the same case*/ !((((i + g->height + x * tab[y]) % g->height) == i) &&
|
||||||
|
(((j + g->width + x * tab[y + 1]) % g->width) == j))))) {
|
||||||
if (game_is_black(g, ((i + g->height + x * tab[y]) % g->height), ((j + g->width + x * tab[y + 1]) % g->width))) {
|
if (game_is_black(g, ((i + g->height + x * tab[y]) % g->height), ((j + g->width + x * tab[y + 1]) % g->width))) {
|
||||||
tab[y] = 0;
|
tab[y] = 0;
|
||||||
tab[y + 1] = 0;
|
tab[y + 1] = 0;
|
||||||
@@ -225,8 +226,9 @@ void game_update_flags(game g) {
|
|||||||
int tab[] = {-1, 0, 1, 0, 0, -1, 0, 1};
|
int tab[] = {-1, 0, 1, 0, 0, -1, 0, 1};
|
||||||
for (uint y = 0; y < 7; y = y + 2) {
|
for (uint y = 0; y < 7; y = y + 2) {
|
||||||
if (/* normal check*/ (j + tab[y + 1] >= 0 && j + tab[y + 1] < g->width && i + tab[y] >= 0 && i + tab[y] < g->height) ||
|
if (/* normal check*/ (j + tab[y + 1] >= 0 && j + tab[y + 1] < g->width && i + tab[y] >= 0 && i + tab[y] < g->height) ||
|
||||||
/*wrapping check*/ (g->wrapping &&
|
/*wrapping check*/ (
|
||||||
!((((i + g->height + tab[y]) % g->height) == i) && (((j + g->width + tab[y + 1]) % g->width) == j)))) {
|
g->wrapping &&
|
||||||
|
/*not the same case*/ !((((i + g->height + tab[y]) % g->height) == i) && (((j + g->width + tab[y + 1]) % g->width) == j)))) {
|
||||||
if (game_is_lightbulb(g, (i + g->height + tab[y]) % g->height, (j + g->width + tab[y + 1]) % g->width))
|
if (game_is_lightbulb(g, (i + g->height + tab[y]) % g->height, (j + g->width + tab[y + 1]) % g->width))
|
||||||
lb++;
|
lb++;
|
||||||
else if (!game_is_blank(g, (i + g->height + tab[y]) % g->height, (j + g->width + tab[y + 1]) % g->width) ||
|
else if (!game_is_blank(g, (i + g->height + tab[y]) % g->height, (j + g->width + tab[y + 1]) % g->width) ||
|
||||||
|
|||||||
Reference in new issue
Block a user