summaryrefslogtreecommitdiff
path: root/snake.c
diff options
context:
space:
mode:
Diffstat (limited to 'snake.c')
-rw-r--r--snake.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/snake.c b/snake.c
index 3bb0bd7..7465e3f 100644
--- a/snake.c
+++ b/snake.c
@@ -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");