Add unicode snake printing
Removed a lot of unused and commented code
This commit is contained in:
+3
-5
@@ -5,11 +5,13 @@ mod menu;
|
||||
// use game::{Cell, Snake};
|
||||
// use ncurses::*;
|
||||
use ncurses::{
|
||||
curs_set, endwin, getmaxyx, initscr, keypad, noecho, raw, refresh, stdscr, CURSOR_VISIBILITY,
|
||||
curs_set, endwin, getmaxyx, initscr, keypad, noecho, raw, refresh, setlocale, stdscr,
|
||||
LcCategory, CURSOR_VISIBILITY,
|
||||
};
|
||||
|
||||
fn main() {
|
||||
// let (lines, cols): (i32, i32) = (0, 0);
|
||||
setlocale(LcCategory::all, "");
|
||||
initscr();
|
||||
raw();
|
||||
keypad(stdscr(), true);
|
||||
@@ -17,10 +19,6 @@ fn main() {
|
||||
noecho();
|
||||
let (mut mlines, mut mcols): (i32, i32) = (0, 0);
|
||||
getmaxyx(stdscr(), &mut mlines, &mut mcols);
|
||||
// let (mlines, mcols) = match getmaxyx(stdscr()) {
|
||||
// Ok(size) => (size.lines, size.columns),
|
||||
// Err(e) => panic!(e),
|
||||
// };
|
||||
if (mlines < 20) || (mcols < 35) {
|
||||
refresh();
|
||||
endwin();
|
||||
|
||||
Reference in New Issue
Block a user