blob: 4472bf4fe392d12430332e50507f2fcb1713579e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
use std::io::{self, Write};
pub fn print_generated_level<W>(
level: &Vec<Vec<bool>>,
out: &mut W,
) -> io::Result<()>
where
W: Write,
{
for row in level {
for cell in row {
write!(out, "{}", if *cell { "X" } else { " " })?;
}
write!(out, "\n")?;
}
Ok(())
}
|