From e5711dbe6dc7f38314971e154b57f49450e68a7c Mon Sep 17 00:00:00 2001 From: Frederick Yin Date: Mon, 6 Jun 2022 12:36:14 +0800 Subject: Reencapsulate functions, print stats after game is over --- ui.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ui.c') diff --git a/ui.c b/ui.c index 70bfe5c..1df1a33 100644 --- a/ui.c +++ b/ui.c @@ -67,6 +67,14 @@ void printpieces(struct piece** hand, int y, int x, int nhand, int highlight) { refresh(); } +void printstats(int points, int combo, int y, int x) { + mvprintw(y, x, "Points: %d", points); + if (combo) + mvprintw(y + 1, x, "Combo: %d", combo); + + refresh(); +} + void printhelp(int y, int x) { mvprintw(y, x, "Press arrow keys / wasd / hjkl to navigate"); mvprintw(y + 1, x, "[ or ] to switch pieces"); -- cgit v1.2.3