diff options
author | eug-vs <eugene@eug-vs.xyz> | 2022-03-31 22:41:21 +0300 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2022-03-31 22:45:19 +0300 |
commit | 7dbd21f32c633e6c0c7fe9c55accda3bfc9fc88c (patch) | |
tree | 933a2df571f4cd782dd40baffcf55d733d590e42 /src/main.c | |
parent | 01d7e24b2c32d9350a11afa0e9ef677790c460d6 (diff) | |
download | carcassonne-engine-c-7dbd21f32c633e6c0c7fe9c55accda3bfc9fc88c.tar.gz |
refactor: remove unused code
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)); |