diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2021-06-07 16:05:37 +0200 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2021-06-07 16:05:37 +0200 |
commit | f3451cbbdd70e0dda15b01a1920f486169c14d0f (patch) | |
tree | dd4743780d782c4f5e7fd89ba479a378b999048f | |
parent | 15573bcdc7de22a3bccdb44ba7024322a5d8fd7b (diff) | |
download | ttfe-f3451cbbdd70e0dda15b01a1920f486169c14d0f.tar.xz |
Make the fields closer to squares
-rw-r--r-- | main.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -386,7 +386,7 @@ void merge_east(board *b) { } } -void merge_west(board *b) { +void merge_west(board *b) { for(int i = 1; i < 4; ++i) { for(int j = 0; j < 4; ++j) { if(b->x[i][j] != 0 && b->x[i-1][j] == b->x[i][j]) { @@ -403,7 +403,7 @@ void print_sep(const char *left, const char *right, const char *cross, const cha { printf("%s", left); for(int i = 0; i < 4; i++) { - for(int j = 0; j < 4; j++) + for(int j = 0; j < 6; j++) printf("%s", line); if(i == 3) printf("%s", right); @@ -420,9 +420,9 @@ void print_board_line(board *b, int l) { uint n = b->x[i][l]; if(n == 0) - printf(" "); + printf(" "); else - printf("%4u", n); + printf("%6u", n); if(i == 3) printf("\u2503"); @@ -431,6 +431,7 @@ void print_board_line(board *b, int l) { } printf("\n"); + print_sep("\u2503", "\u2503", "\u2502", " "); if(l == 3) print_sep("\u2517", "\u251B", "\u2537", "\u2501"); |