diff options
author | Charlie Stanton <charlie@shtanton.xyz> | 2025-04-06 18:19:16 +0100 |
---|---|---|
committer | Charlie Stanton <charlie@shtanton.xyz> | 2025-04-06 18:19:16 +0100 |
commit | 133d07d5e7781c86cc11cd86e80ad1ff5325fc36 (patch) | |
tree | a295229e8a57889fbae232ba4f191dbf1bf4b927 /src/tick.c | |
parent | c8260245622780be003a897464bd5f7798b3a307 (diff) | |
download | ldjam57-133d07d5e7781c86cc11cd86e80ad1ff5325fc36.tar |
add nelson transparency
Diffstat (limited to 'src/tick.c')
-rw-r--r-- | src/tick.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -236,7 +236,7 @@ static void tick(Game *game, Arena a) { case BLUE_LEFT: if ( (x > 0 && isRed(lastState->grid[x - 1 + y * GRIDWIDTH])) || - (x < GRIDWIDTH - 1 && isRed(lastState->grid[x + 1 + y * GRIDWIDTH])) || + // (x < GRIDWIDTH - 1 && isRed(lastState->grid[x + 1 + y * GRIDWIDTH])) || (y > 0 && isRed(lastState->grid[x + (y - 1) * GRIDWIDTH])) || (y < GRIDHEIGHT - 1 && isRed(lastState->grid[x + (y + 1) * GRIDWIDTH])) ) { @@ -252,7 +252,7 @@ static void tick(Game *game, Arena a) { break; case BLUE_RIGHT: if ( - (x > 0 && isRed(lastState->grid[x - 1 + y * GRIDWIDTH])) || + // (x > 0 && isRed(lastState->grid[x - 1 + y * GRIDWIDTH])) || (x < GRIDWIDTH - 1 && isRed(lastState->grid[x + 1 + y * GRIDWIDTH])) || (y > 0 && isRed(lastState->grid[x + (y - 1) * GRIDWIDTH])) || (y < GRIDHEIGHT - 1 && isRed(lastState->grid[x + (y + 1) * GRIDWIDTH])) @@ -271,8 +271,8 @@ static void tick(Game *game, Arena a) { if ( (x > 0 && isRed(lastState->grid[x - 1 + y * GRIDWIDTH])) || (x < GRIDWIDTH - 1 && isRed(lastState->grid[x + 1 + y * GRIDWIDTH])) || - (y > 0 && isRed(lastState->grid[x + (y - 1) * GRIDWIDTH])) || - (y < GRIDHEIGHT - 1 && isRed(lastState->grid[x + (y + 1) * GRIDWIDTH])) + (y > 0 && isRed(lastState->grid[x + (y - 1) * GRIDWIDTH]))// || + // (y < GRIDHEIGHT - 1 && isRed(lastState->grid[x + (y + 1) * GRIDWIDTH])) ) { game->state.grid[x + y * GRIDWIDTH] = BLUE; } else if ( @@ -288,7 +288,7 @@ static void tick(Game *game, Arena a) { if ( (x > 0 && isRed(lastState->grid[x - 1 + y * GRIDWIDTH])) || (x < GRIDWIDTH - 1 && isRed(lastState->grid[x + 1 + y * GRIDWIDTH])) || - (y > 0 && isRed(lastState->grid[x + (y - 1) * GRIDWIDTH])) || + // (y > 0 && isRed(lastState->grid[x + (y - 1) * GRIDWIDTH])) || (y < GRIDHEIGHT - 1 && isRed(lastState->grid[x + (y + 1) * GRIDWIDTH])) ) { game->state.grid[x + y * GRIDWIDTH] = BLUE; |