feat: fruits, globals, input, snake, point, window
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
#include "input.hpp"
|
||||
#include <ncurses.h>
|
||||
|
||||
void Input::get_input() {
|
||||
while(true) {
|
||||
initscr();
|
||||
cbreak();
|
||||
noecho();
|
||||
|
||||
m_current_key = getch();
|
||||
endwin();
|
||||
if(m_current_key == 'q') {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user