fn init(board: &Board) -> bool {
    let termsize = termion::terminal_size().ok();
    let termwidth = termsize.map(|(w, _)| w - 2).unwrap();
    let termheight = termsize.map(|(_, h)| h - 2).unwrap();
    if board.v_keys.len() * 2 + 6 > termheight.into() {
        return false;
    }
    if board.h_keys.len() * 2 + 6 > termwidth.into() {
        return false;
    }
    true
}
//check that the terminal is large enough to fit the given puzzle
check that the terminal is large enough to fit the given puzzle
check that the terminal is large enough to fit the given puzzle
fn init(board: &Board) -> bool {
    let termsize = termion::terminal_size().ok();
    let termwidth = termsize.map(|(w, _)| w - 2).unwrap();
    let termheight = termsize.map(|(_, h)| h - 2).unwrap();
    if board.v_keys.len() * 2 + 6 > termheight.into() {
        return false;
    }
    if board.h_keys.len() * 2 + 6 > termwidth.into() {
        return false;
    }
    true
}
fn init ( board : & Board ) -> bool { let termsize = termion :: terminal_size ( ) . ok ( ) ; let termwidth = termsize . map ( | ( w , _ ) | w - 2 ) . unwrap ( ) ; let termheight = termsize . map ( | ( _ , h ) | h - 2 ) . unwrap ( ) ; if board . v_keys . len ( ) * 2 + 6 > termheight . into ( ) { return false ; } if board . h_keys . len ( ) * 2 + 6 > termwidth . into ( ) { return false ; } true }
check that the terminal is large enough to fit the given puzzle
check that the terminal is large enough to fit the given puzzle
board
&Board
board
&Board