I have three different classes. Each class is responsible for drawing a specific thing using ncurses.
I must draw all the three things at once. One of the classes is responsible for a board, and the other two classes draws something inside the board.
I got it to work, but the problem is that whenever I use clear
, it clears the board and the other two things; I want the board to stay and never get erased. I want to clear the drawing that only the specific class is responsible for.
For example, let's say I have a board, and I have a person
class and a dog
class. When I call the draw
method in the person
class, it draws me the person inside the board, but whenever I move it to a different point, it draws a new person, but it never clears the old person.
Same thing with the dog unless I use the clear
method from the curses.h
but it erases and clears everything including the board and the dog.
However, I only want to erase the person and not everything. Is there any built-in method to use from ncurses other than clear
or erase
, or anything that clears the whole screen?