From 59be269502c68cd9b7dc88f4a0d737c681b9811c Mon Sep 17 00:00:00 2001 From: begilbert-sys Date: Tue, 16 Jan 2024 23:19:44 -0800 Subject: [PATCH] Update main.c --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index ab40813..28b6b06 100644 --- a/main.c +++ b/main.c @@ -85,7 +85,7 @@ void draw_grid() { void _addstr_centered(int tile_value) { /* draw the tile number so that it's centered */ int length = 1; - if (tile_value != 0) { + if (tile_value != BLANK) { // calculate length of integer length = log10(tile_value) + 1; } @@ -112,7 +112,7 @@ void display_board() { for (int j = 0; j < 4; j++) { int tile_value = board[i][j]; int color_pair = COLOR_PAIR_DEFAULT; - if (tile_value != 0) { + if (tile_value != BLANK) { color_pair = (int)log2(tile_value); } attron(COLOR_PAIR(color_pair));