position and robot structs

This commit is contained in:
Volodymyr Patuta 2020-10-16 09:11:28 +02:00
parent cff39f9dad
commit 918334a3cb
1 changed files with 10 additions and 1 deletions

View File

@ -1,6 +1,16 @@
use std::fs;
use std::io;
struct Position {
x: i32,
y: i32,
}
struct Robot {
o: Orientation,
p: Position,
}
enum Orientation {
N,
E,
@ -68,5 +78,4 @@ mod tests {
assert!(open_file("two_robots.txt").is_ok());
assert!(open_file("test_unexisting_file.extension").is_err());
}
}