Commit Graph

72 Commits

Author SHA1 Message Date
Volodymyr Patuta 22cf314f4d add map 2020-10-19 12:32:14 +02:00
Volodymyr Patuta b2b00d0d62 added struct World 2020-10-19 12:23:38 +02:00
mhart a55a4935ac Rename conf to raw_conf, conf will be the parsed configuration String 2020-10-17 21:17:36 +02:00
mhart bd89bfa744 Add Vec<Robot> to store all the robots 2020-10-17 21:05:06 +02:00
mhart 8508c53bef Add documentation to main.rs 2020-10-17 18:16:40 +02:00
Volodymyr Patuta a688c11d4b Changed position to u32 and added ID. 2020-10-16 12:59:40 +02:00
Volodymyr Patuta 918334a3cb position and robot structs 2020-10-16 09:11:28 +02:00
Volodymyr Patuta 972850310e No need to test file without permission. 2020-10-13 12:27:41 +02:00
Volodymyr Patuta 8c04fe7b9d Added `test_open_file()` 2020-10-13 12:15:04 +02:00
mhart 1ee584801a Add test to
parse_orientation()
parse_instruction()
2020-10-13 12:08:26 +02:00
Volodymyr Patuta 3106882ddb Update main.rs 2020-10-13 10:31:50 +02:00
Volodymyr Patuta 630e5e05b1 func to get file content as Result<String> 2020-10-13 10:19:34 +02:00
mhart 8c16773fe9 Revert "Change (c : char) in"
This reverts commit edf29050c6.

Bad optimization...
2020-10-11 21:45:56 +02:00
mhart edf29050c6 Change (c : char) in
parse_orientation()
parse_instruction()
to (c: &char)
2020-10-11 20:24:35 +02:00
mhart 6e1589ff7d Change Option<> in
parse_orientation()
parse_instruction()
for Result<Instruction, &'static str>
2020-10-11 20:10:17 +02:00
mhart c2d6e3422d Add parse_instruction()
Same as the parse_orientation() function but for the instruction model
2020-10-11 18:31:56 +02:00
mhart c1143ee396 Add parse_orientation()
This function parse a char and return the matching direction or None
2020-10-11 18:27:39 +02:00
mhart dcbc5aa74c correct typo 2020-10-11 18:25:42 +02:00
mhart 699933fcfd Load the 'simple' intruction file into a string.
Need to incorporate flags OR/AND stdin parsing in a later stage.
2020-10-11 15:14:20 +02:00
mhart b811b1a1c1 fix tipo error and create enum to represent instructions 2020-10-06 23:28:59 +02:00
mhart e6433f48ae Create enum to represent directions 2020-10-06 23:25:17 +02:00
Axel Viala ed2b1b152d initial commit let's droid dance. 2020-10-06 20:42:34 +02:00