pub fn init_terminal() -> Result<SystemTerminal,()> {
    if ncurses::initscr() == null_mut()
    || ncurses::noecho() != ncurses::OK
    || ncurses::start_color() != ncurses::OK {
        return Err(())
    }
        
    for i in 0..8 {
        for j in 0..8 {
            if ncurses::init_pair(i * 8 + j + 1, i, j) != ncurses::OK {
                return Err(())
            }
        }
    }
    
    Ok(SystemTerminal { default_color: ColorPair { fg: Some(DarkWhite), bg: Some(DarkBlack) }})
}
/// Initializes system terminal. **WARNING: Must NOT be called more than once in runtime.**
Initializes system terminal. **WARNING: Must NOT be called more than once in runtime.
Initializes system terminal . ** WARNING : Must NOT be called more than once in runtime .
pub fn init_terminal() -> Result<SystemTerminal,()> {
    if ncurses::initscr() == null_mut()
    || ncurses::noecho() != ncurses::OK
    || ncurses::start_color() != ncurses::OK {
        return Err(())
    }
    for i in 0..8 {
        for j in 0..8 {
            if ncurses::init_pair(i * 8 + j + 1, i, j) != ncurses::OK {
                return Err(())
            }
        }
    }
    Ok(SystemTerminal { default_color: ColorPair { fg: Some(DarkWhite), bg: Some(DarkBlack) }})
}
pub fn init_terminal ( ) -> Result < SystemTerminal , ( ) > { if ncurses :: initscr ( ) == null_mut ( ) || ncurses :: noecho ( ) != ncurses :: OK || ncurses :: start_color ( ) != ncurses :: OK { return Err ( ( ) ) } for i in 0 .. 8 { for j in 0 .. 8 { if ncurses :: init_pair ( i * 8 + j + 1 , i , j ) != ncurses :: OK { return Err ( ( ) ) } } } Ok ( SystemTerminal { default_color : ColorPair { fg : Some ( DarkWhite ) , bg : Some ( DarkBlack ) } } ) }
Initializes system terminal.
Initializes system terminal .