corrected some major minor errors haha
This commit is contained in:
parent
58a0e5a1a7
commit
7b3bdbfa11
10
src/main.rs
10
src/main.rs
@ -206,21 +206,21 @@ fn display_grid(
|
||||
for i in (0..w.y).rev() {
|
||||
print!("{} ", i);
|
||||
for j in 0..w.x {
|
||||
print!("{} ", i);
|
||||
match h.get(Position{ x: j, y: i }) {
|
||||
some(id) => match robot_pool[(id - 1) as usize].o {
|
||||
match h.get(&robot::Position { x: j, y: i }) {
|
||||
Some(id) => match robot_pool[(id - 1) as usize].o {
|
||||
robot::Orientation::N => print!("↑"),
|
||||
robot::Orientation::E => print!("→"),
|
||||
robot::Orientation::S => print!("↓"),
|
||||
robot::Orientation::W => print!("←"),
|
||||
None => print!("."),
|
||||
},
|
||||
|
||||
None => print!("."),
|
||||
}
|
||||
}
|
||||
println!();
|
||||
}
|
||||
print!(" ");
|
||||
for j in (0..w.x){
|
||||
for j in 0..w.x {
|
||||
print!("{} ", j);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user