diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -20,7 +20,7 @@ void draw_structures(BoardUnit* board, WINDOW* win) { for (int i = 0; i < BOARD_ROW_UNITS; i++) { int index = BOARD_ROW_UNITS * row + i; if (board[index].feature == EMPTY && is_center_index(index)) waddch(win, '*'); - else waddch(win, board[index].structure_group == 0 ? ' ' : '0' + board[index].structure_group); + else waddch(win, board[index].structure_group == 0 ? EMPTY : '0' + board[index].structure_group); } } } @@ -64,7 +64,6 @@ int main() { /* main loop */ char position[3]; while (1) { - /* prepare */ refresh_structure_groups(board); wclear(input_win); @@ -86,7 +85,7 @@ int main() { box(input_box, 0, 0); mvwaddstr(input_box, 0, 0, "Enter position:"); wrefresh(input_box); - wgetstr(input_win, position); + wgetnstr(input_win, position, 3); int result = place_tile(tile, translate_coordinate(atoi(position)), board, 0); if (result) wprintw(messages_win, "Placed tile %s (%c) at position %i\n", tile.edges, tile.center, atoi(position)); |