pub fn print(&self) {
        println!("---Current Game Board---");
        println!("height: {:?}      width: {:?}", self.height, self.width);
        println!("------------------------");
        for row in 0..self.height {
            let mut row_str: String = String::from(" ");
            for col in 0..self.width {
                if self.board[row][col] {
                    row_str += "1 ";
                } else {
                    row_str += "0 ";
                }
            }
            println!("{:?}", row_str);
        }
    }
// a print function for the game board
a print function for the game board
a print function for the game board
pub fn print(&self) {
        println!("---Current Game Board---");
        println!("height: {:?}      width: {:?}", self.height, self.width);
        println!("------------------------");
        for row in 0..self.height {
            let mut row_str: String = String::from(" ");
            for col in 0..self.width {
                if self.board[row][col] {
                    row_str += "1 ";
                } else {
                    row_str += "0 ";
                }
            }
            println!("{:?}", row_str);
        }
    }
pub fn print ( & self ) { println ! ( " " ) ; println ! ( " " self height self width ) ; println ! ( " " ) ; for row in 0 .. self . height { let mut row_str : String = String :: from ( " " ) ; for col in 0 .. self . width { if self . board [ row ] [ col ] { row_str += " " ; } else { row_str += " " ; } } println ! ( " " row_str ) ; } }
a print function for the game board
a print function for the game board
&self