fn overlay_boards(board1: &[Vec<char>], board2: &[Vec<char>]) -> Vec<Vec<char>> {
                board1
                    .iter()
                    .zip(board2)
                    .map(|(r1, r2)| {
                        r1.iter()
                            .zip(r2)
                            .map(|(&i1, &i2)| if i2 == '?' { i1 } else { i2 })
                            .collect()
                    })
                    .collect()
            }
// Shows your board, but with any hits and misses overlaid
Shows your board, but with any hits and misses overlaid
Shows your board but with any hits and misses overlaid
fn overlay_boards(board1: &[Vec<char>], board2: &[Vec<char>]) -> Vec<Vec<char>> {
                board1
                    .iter()
                    .zip(board2)
                    .map(|(r1, r2)| {
                        r1.iter()
                            .zip(r2)
                            .map(|(&i1, &i2)| if i2 == '?' { i1 } else { i2 })
                            .collect()
                    })
                    .collect()
            }
fn overlay_boards ( board1 : & [ Vec < char > ] , board2 : & [ Vec < char > ] ) -> Vec < Vec < char > > { board1 . iter ( ) . zip ( board2 ) . map ( | ( r1 , r2 ) | { r1 . iter ( ) . zip ( r2 ) . map ( | ( & i1 , & i2 ) | if i2 == '?' { i1 } else { i2 } ) . collect ( ) } ) . collect ( ) }
Shows your board, but with any hits and misses overlaid
Shows your board but with any hits and misses overlaid
board1
&[Vec<char>]
board2
&[Vec<char>]