From 4f617d534a7dec9af40ccb969f27c4035b2a0250 Mon Sep 17 00:00:00 2001 From: girst Date: Sat, 16 Feb 2019 23:18:57 +0100 Subject: [PATCH] win_anim: print everywhere on the terminal --- sol.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sol.c b/sol.c index 0e57428..e292701 100644 --- a/sol.c +++ b/sol.c @@ -1476,9 +1476,8 @@ void win_anim(void) { printf ("\033[?25l"); /* hide cursor */ for (;;) { /* set cursor to random location */ - //TODO: use actual terminal size instead! - int row = 1+rand()%(24-op.s->width); - int col = 1+rand()%(80-op.s->height); + int row = 1+rand()%(op.w[0]-op.s->width); + int col = 1+rand()%(op.w[1]-op.s->height); /* draw random card */ int face = 1 + rand() % 52; -- 2.39.3