diff options
| author | WormHeamer | 2025-11-07 19:54:00 -0500 |
|---|---|---|
| committer | WormHeamer | 2025-11-07 19:54:00 -0500 |
| commit | a527b2b11a7efd7da30098107aa302833fae37c2 (patch) | |
| tree | 3f0b3a27e9eb5e537c2b1d52d1774b8625f40f28 /main.c | |
| parent | be70a60027663b26330ab38259d5c79ad0fa5185 (diff) | |
box drawing chars for border
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 20 |
1 files changed, 12 insertions, 8 deletions
@@ -151,20 +151,22 @@ void brd_draw(void) { u32 right = left + WIDTH * 2; u32 bottom = top + HEIGHT; for (u32 y = 0; y < HEIGHT; y++) { - vui_chr(left - 1, top + y, u'❘'); - vui_chr(right + 1, top + y, u'❘'); + vui_chr(left - 1, top + y, u'║'); + vui_chr(right + 1, top + y, u'║'); for (u32 x = 0; x < WIDTH; x++) { Tile t = board[y][x]; vui_chra(left + 2 * x, top + y, tile_chr[t][0], tile_attr[t][0]); vui_chra(left + 2 * x + 1, top + y, tile_chr[t][1], tile_attr[t][1]); - vui_puts(left + 2 * x, top - 1, "──"); - vui_puts(left + 2 * x, bottom, "──"); + vui_puts(left + 2 * x, top - 1, "══"); + vui_puts(left + 2 * x, bottom, "══"); } } - vui_chr(left - 1, top - 1, u'┌'); - vui_chr(right + 1, top - 1, u'┐'); - vui_chr(left - 1, bottom, u'└'); - vui_chr(right + 1, bottom, u'┘'); + vui_chr(left - 1, top - 1, u'╔'); + vui_chr(right + 1, top - 1, u'╗'); + vui_chr(left - 1, bottom, u'╚'); + vui_chr(right + 1, bottom, u'╝'); + vui_chr(right, bottom, u'═'); + vui_chr(right, top - 1, u'═'); /* u32 x = 0; u32 y = 1; @@ -251,6 +253,8 @@ void snk_chg_dir(Snake *s, Dir d) { } } +/* game */ + int main(void) { srand(time(NULL)); vui_init(); |
