add fn display_grid skeleton

This commit is contained in:
EliasCubz 2020-10-31 23:10:41 +01:00
parent 0fdad0c929
commit a1080587d1
2 changed files with 18 additions and 0 deletions

2
niktoi Normal file
View File

@ -0,0 +1,2 @@
niktoi

View File

@ -198,6 +198,22 @@ fn open_file(filename: &str) -> io::Result<String> {
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>> {
// We handle CLI flags here.
let matches = App::new("DancingDroids")