add fn display_grid skeleton
This commit is contained in:
parent
0fdad0c929
commit
a1080587d1
16
src/main.rs
16
src/main.rs
@ -198,6 +198,22 @@ fn open_file(filename: &str) -> io::Result<String> {
|
|||||||
Ok(content)
|
Ok(content)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn display_grid(h: HashMap<>, ){
|
||||||
|
for (i=0;j<xmax;++j){
|
||||||
|
for(r.p.x == j && r.p.y==i){
|
||||||
|
match some(hash.get(position{x: j, y: i})) =>
|
||||||
|
match robot_pool[id-1].o {
|
||||||
|
"N" => println!("fleche du haut"),
|
||||||
|
"E" => println!("fleche a droite"),
|
||||||
|
"W" => println!("fleche a gauche"),
|
||||||
|
"S" => println!("fleche en bas"),
|
||||||
|
|
||||||
|
},
|
||||||
|
None => println!("."),
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
// We handle CLI flags here.
|
// We handle CLI flags here.
|
||||||
let matches = App::new("DancingDroids")
|
let matches = App::new("DancingDroids")
|
||||||
|
Loading…
Reference in New Issue
Block a user