diff options
| author | Kai Stevenson <kai@kaistevenson.com> | 2023-02-06 16:05:45 -0800 |
|---|---|---|
| committer | Kai Stevenson <kai@kaistevenson.com> | 2023-02-06 16:05:45 -0800 |
| commit | c29474c03667bcbe99e48fd565ce6736233175d1 (patch) | |
| tree | 022488e3bbdc71dbc419add106d95faf0c0fe5db /snake.c | |
| parent | 76eeb585ed13fe96321489641a485ce387823db9 (diff) | |
changed obstacle colour, changed obstacle quantity math
Diffstat (limited to 'snake.c')
| -rw-r--r-- | snake.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -90,7 +90,7 @@ int main(int argc, char **argv) { } } /* check argument compatibility */ - if(obstacles * 2 > boardSize) { + if((obstacles * obstacleSize) * 3 > pow(boardSize, 2)) { fprintf(stderr, "%stoo many obstacles. Please try again.%s\n", RED, COLOR_RESET); exit(1); } @@ -356,7 +356,7 @@ void draw_board() { } else if(type == 4) { /* obstacle */ - printf("%s# %s", MAG, COLOR_RESET); + printf("%s# %s", RED, COLOR_RESET); } } printf("\n"); |
