Moving Q
Basic Requirements (60pt)
- Use the "ncurses" library to develop a program, which shows the
character 'Q' at (10, 10).
- The user may use the keys h,j,k,l to move 'Q' to
Left,Down,Up,Right.
- If the user types "q", the program terminates.
- The flowchart looks like the one below.
Advanced Requirements (40pt)
- (10pt) Allow users to use both uppercase 'H' and lowercase
'h' to do the same movement.
- (10pt) Users can use either arrow keys or HJKL to
control the movement of 'Q'.
- (10pt) Users can also change the color of 'Q' by pressing '0'…'7'.
- (10pt) Depending on the window size when the user starts running
this program, your program should not
allow him/her to move the 'Q' outside of the window.