diff options
| -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"); |
