Initial commit I think

Initial commit with just menu and sort of pause menu only
This commit is contained in:
Uttarayan Mondal
2021-01-05 03:40:51 +05:30
commit 4cc7dbce92
5 changed files with 258 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
extern crate ncurses;
mod game;
mod menu;
// use game::{Cell, Snake};
// use ncurses::*;
use ncurses::{curs_set, endwin, initscr, keypad, noecho, raw, refresh, stdscr, CURSOR_VISIBILITY};
fn main() {
// let (lines, cols): (i32, i32) = (0, 0);
initscr();
raw();
keypad(stdscr(), true);
curs_set(CURSOR_VISIBILITY::CURSOR_INVISIBLE);
noecho();
loop {
match menu::main_menu_control() {
0 => game::start(),
1 => game::start(),
_ => break,
}
}
refresh();
endwin();
}