use std::io::{self, Write};
pub mod colors;
pub use colors::Colors;
extern {
fn _getch() -> core::ffi::c_char;
}
pub fn getch() -> u8 {
unsafe {
_getch() as u8
}
}
pub fn getch_as_char() -> char {
getch() as char
}
pub fn same_line_input(msg: &str) -> String {
print!("{}", msg);
io::stdout().flush().unwrap();
let mut input = String::new();
io::stdin().read_line(&mut input).unwrap();
input.trim().to_string()
}
pub mod cls {
pub fn cls() {
print!("{}[2J{}[1;1H", 27 as char, 27 as char);
}
}
pub use cls::cls;