homework is completed
This commit is contained in:
1 parent
6ffbfbb7bf
commit
f235fdcea6
3 files changed
+68
-20
No files matched your search
+4
-2
@@ -37,16 +37,18 @@ impl Render {
|
||||
Ok(())
|
||||
}
|
||||
pub fn frame(&mut self, g: &Grid) -> Result<(), std::io::Error> {
|
||||
queue!(self.out, MoveTo(0, 0))?;
|
||||
for i in 0..self.rez.0 {
|
||||
for j in 0..self.rez.1 {
|
||||
let r = g.who_in(&(i, j));
|
||||
match r {
|
||||
true => {
|
||||
Some(true) => {
|
||||
queue!(self.out, Print("፨"))?;
|
||||
}
|
||||
false => {
|
||||
Some(false) => {
|
||||
queue!(self.out, Print(" "))?;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
queue!(self.out, Print("\r\n"))?;
|
||||
|
||||
Reference in new issue
Block a user