pub fn read_board(&mut self) {
        let mut new_board = vec!(vec!(EMPTY; WIDTH); HEIGHT);
        for rownum in 0..HEIGHT {
            let mut line_str = String::new();
            io::stdin().read_line(&mut line_str)
                .expect("Failed to read line");
            let line_str = line_str.trim();
            let mut row = vec!('.'; WIDTH);
            for (i, item) in line_str.split_whitespace().enumerate() {
                row[i] = item.chars().nth(0).unwrap();
            }
            new_board[rownum] = row;
        }
        self.board = new_board;
    }
/// Read in a game board state from stdin.
Read in a game board state from stdin.
Read in a game board state from stdin .
pub fn read_board(&mut self) {
        let mut new_board = vec!(vec!(EMPTY; WIDTH); HEIGHT);
        for rownum in 0..HEIGHT {
            let mut line_str = String::new();
            io::stdin().read_line(&mut line_str)
                .expect("Failed to read line");
            let line_str = line_str.trim();
            let mut row = vec!('.'; WIDTH);
            for (i, item) in line_str.split_whitespace().enumerate() {
                row[i] = item.chars().nth(0).unwrap();
            }
            new_board[rownum] = row;
        }
        self.board = new_board;
    }
pub fn read_board ( & mut self ) { let mut new_board = vec ! ( vec ( EMPTY WIDTH ) HEIGHT ) ; for rownum in 0 .. HEIGHT { let mut line_str = String :: new ( ) ; io :: stdin ( ) . read_line ( & mut line_str ) . expect ( " " ) ; let line_str = line_str . trim ( ) ; let mut row = vec ! ( '.' WIDTH ) ; for ( i , item ) in line_str . split_whitespace ( ) . enumerate ( ) { row [ i ] = item . chars ( ) . nth ( 0 ) . unwrap ( ) ; } new_board [ rownum ] = row ; } self . board = new_board ; }
Read in a game board state from stdin.
Read in a game board state from stdin .
&mut self
&mut self