Terminal-based game in C and ncurses library