Skip to content

Commit

Permalink
Aggiunta la documentazione per il tool del radar
Browse files Browse the repository at this point in the history
Manca da aggiungere un esempio.
Il tool è comunque da ricontrollare
  • Loading branch information
mr-u238 committed Dec 12, 2023
1 parent a23cc9d commit bbebbb6
Show file tree
Hide file tree
Showing 304 changed files with 709 additions and 3 deletions.
33 changes: 32 additions & 1 deletion radar/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,43 @@ pub enum RadarError {
MustDestroyContentFirst,
UndefinedError,
}
/// Given the: robot, world, direction, distance, state and TileType, it will return the coordinates of the closest tile of TileType.
/// The tool will search in a rectangle of 3 x distance, starting from you position and the two tiles in your sides.
///
/// #Usage
///```
/// Todo
///
/// #Arguments
/// - `robot`: The robot
/// - `world`: The world
/// - `direction`: The direction in wkich the robot is looking
/// - `distance`: How long you want to search
///
/// #Returns
/// -`(Tile, usize, usize)`:returns the tile and it's own coordinates (row and columns)
/// -`LibError`: The error that ocurred
///
/// #Errors
/// - `NotEnoughEnergy`: The robot doesn't have enough energy to see the tile
/// - `NoContent`: The tile you are looking for doesn't exist there
/// - `OutOfBounds`: You tried to look for a tile which is outside of the world
///
/// #Examples
///```rust
/// use robotics_lib::interface::one_direction_view;
/// use robotics_lib::runner::Runnable;
/// use robotics_lib::world::World;
/// use robotics_lib::world::tile::Tile;
/// use robotics_lib::interface::Direction;
/// use //Todo(Where is implemented the tool)
///
/// Todo
impl Tool {
pub fn radar(
robot: &mut impl Runnable,
world: &mut World,
direction: Direction,
state: State,
distance: usize,
tile_type: TileType,
) -> Result<(Tile, usize, usize), LibError> {
Expand Down
2 changes: 1 addition & 1 deletion radar/target/.rustc_info.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"rustc_fingerprint":16991856722543874264,"outputs":{"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.74.0 (79e9716c9 2023-11-13)\nbinary: rustc\ncommit-hash: 79e9716c980570bfd1f666e3b16ac583f0168962\ncommit-date: 2023-11-13\nhost: x86_64-unknown-linux-gnu\nrelease: 1.74.0\nLLVM version: 17.0.4\n","stderr":""},"15729799797837862367":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/redi/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""}},"successes":{}}
{"rustc_fingerprint":5293076458971548931,"outputs":{"15729799797837862367":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/windows7/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""},"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.72.0 (5680fa18f 2023-08-23)\nbinary: rustc\ncommit-hash: 5680fa18feaa87f3ff04063800aec256c3d4b4be\ncommit-date: 2023-08-23\nhost: x86_64-unknown-linux-gnu\nrelease: 1.72.0\nLLVM version: 16.0.5\n","stderr":""}},"successes":{}}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file has an mtime of when this was started.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a47c53607eac7318
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"rustc":17954901377634971088,"features":"[]","target":10623512480563079566,"profile":14473208297124147686,"path":1052326989870696303,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/cfg-if-2a5399a947987dd5/dep-lib-cfg-if"}}],"rustflags":[],"metadata":8462187951337715540,"config":2202906307356721367,"compile_kind":0}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file has an mtime of when this was started.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deba7aa23cf6ea48
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"rustc":17954901377634971088,"features":"[]","target":10623512480563079566,"profile":644273664987288228,"path":1052326989870696303,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/cfg-if-a4949322dd83a0a2/dep-lib-cfg-if"}}],"rustflags":[],"metadata":8462187951337715540,"config":2202906307356721367,"compile_kind":0}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file has an mtime of when this was started.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0de56599e5bace65
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"rustc":17954901377634971088,"features":"[\"std\"]","target":16789414514566550411,"profile":644273664987288228,"path":16916702811947836177,"deps":[[2452538001284770427,"cfg_if",false,5254282655565527774],[7333356460339158070,"libc",false,5401612371776158605]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/getrandom-429e16d9d1341fb2/dep-lib-getrandom"}}],"rustflags":[],"metadata":12606519392706294666,"config":2202906307356721367,"compile_kind":0}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file has an mtime of when this was started.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8294b734afb27125
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"rustc":17954901377634971088,"features":"[\"std\"]","target":16789414514566550411,"profile":14473208297124147686,"path":16916702811947836177,"deps":[[2452538001284770427,"cfg_if",false,1761941538013936804],[7333356460339158070,"libc",false,715205588328716718]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/getrandom-e3665f61f829ae43/dep-lib-getrandom"}}],"rustflags":[],"metadata":12606519392706294666,"config":2202906307356721367,"compile_kind":0}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file has an mtime of when this was started.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
352955ad71ba38cd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"rustc":17954901377634971088,"features":"[\"default\"]","target":11271119367433188140,"profile":13178609178403335023,"path":1257173050919136845,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/heck-035c046fdc5afb82/dep-lib-heck"}}],"rustflags":[],"metadata":4968006677088137060,"config":2202906307356721367,"compile_kind":0}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file has an mtime of when this was started.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e0cbc3ea6b28e266
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"rustc":17954901377634971088,"features":"[]","target":1623840821729021818,"profile":644273664987288228,"path":2982180731944858053,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/lazy_static-643a017f62beb017/dep-lib-lazy_static"}}],"rustflags":[],"metadata":111743654650316589,"config":2202906307356721367,"compile_kind":0}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file has an mtime of when this was started.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
09e9232cf971e2d9
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"rustc":17954901377634971088,"features":"[]","target":1623840821729021818,"profile":14473208297124147686,"path":2982180731944858053,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/lazy_static-7e031601acb3035e/dep-lib-lazy_static"}}],"rustflags":[],"metadata":111743654650316589,"config":2202906307356721367,"compile_kind":0}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
582fae3ed41309d7
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"rustc":17954901377634971088,"features":"[]","target":8188216131759486267,"profile":13178609178403335023,"path":16379206652225932654,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/libc-48779a8215c75f52/dep-build-script-build-script-build"}}],"rustflags":[],"metadata":14998826085014762512,"config":2202906307356721367,"compile_kind":0}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file has an mtime of when this was started.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file has an mtime of when this was started.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8dbb124ad561f64a
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"rustc":17954901377634971088,"features":"[]","target":1307715644349195660,"profile":644273664987288228,"path":15024436826766188098,"deps":[[7333356460339158070,"build_script_build",false,2938311653944202160]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/libc-58a022b0af0a85fa/dep-lib-libc"}}],"rustflags":[],"metadata":14998826085014762512,"config":2202906307356721367,"compile_kind":0}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b013bca4e1fac628
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"rustc":17954901377634971088,"features":"","target":0,"profile":0,"path":0,"deps":[[7333356460339158070,"build_script_build",false,15494937795250499416]],"local":[{"RerunIfChanged":{"output":"debug/build/libc-72e089a82c26587e/output","paths":["build.rs"]}}],"rustflags":[],"metadata":0,"config":0,"compile_kind":0}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file has an mtime of when this was started.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ae19b579b1ebec09
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"rustc":17954901377634971088,"features":"[]","target":1307715644349195660,"profile":14473208297124147686,"path":15024436826766188098,"deps":[[7333356460339158070,"build_script_build",false,2938311653944202160]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/libc-fd364159477a14cf/dep-lib-libc"}}],"rustflags":[],"metadata":14998826085014762512,"config":2202906307356721367,"compile_kind":0}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file has an mtime of when this was started.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
791786fe2e22f9a5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"rustc":17954901377634971088,"features":"[\"simd\", \"std\"]","target":602634026009422966,"profile":14473208297124147686,"path":3797681691971182618,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/ppv-lite86-3908d08fbf671386/dep-lib-ppv-lite86"}}],"rustflags":[],"metadata":14155036307809790115,"config":2202906307356721367,"compile_kind":0}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file has an mtime of when this was started.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
37436ecd77d20d22
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"rustc":17954901377634971088,"features":"[\"simd\", \"std\"]","target":602634026009422966,"profile":644273664987288228,"path":3797681691971182618,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/ppv-lite86-ceccd0b09e3a5a4b/dep-lib-ppv-lite86"}}],"rustflags":[],"metadata":14155036307809790115,"config":2202906307356721367,"compile_kind":0}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
95f83c377f3a64d6
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"rustc":17954901377634971088,"features":"","target":0,"profile":0,"path":0,"deps":[[8871335013264524628,"build_script_build",false,875716943878233703]],"local":[{"RerunIfChanged":{"output":"debug/build/proc-macro2-0705f5b4be0ef009/output","paths":["build.rs"]}}],"rustflags":[],"metadata":0,"config":0,"compile_kind":0}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
671ea7b3eb2b270c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"rustc":17954901377634971088,"features":"[\"default\", \"proc-macro\"]","target":427768481117760528,"profile":13178609178403335023,"path":7513514190760523214,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/proc-macro2-5b4a6aef1db50386/dep-build-script-build-script-build"}}],"rustflags":[],"metadata":7635439851376710101,"config":2202906307356721367,"compile_kind":0}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file has an mtime of when this was started.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file has an mtime of when this was started.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a9aabb6db2d633bf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"rustc":17954901377634971088,"features":"[\"default\", \"proc-macro\"]","target":16714894217519287322,"profile":13178609178403335023,"path":7267996658446244794,"deps":[[8871335013264524628,"build_script_build",false,15448536939849644181],[10045147784146067611,"unicode_ident",false,17119654253242514240]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/proc-macro2-ea15e4f747256503/dep-lib-proc-macro2"}}],"rustflags":[],"metadata":7635439851376710101,"config":2202906307356721367,"compile_kind":0}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file has an mtime of when this was started.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ec7ab41b0eae9e7d
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"rustc":17954901377634971088,"features":"[\"default\", \"proc-macro\"]","target":10824007166531090010,"profile":13178609178403335023,"path":7737768106185059823,"deps":[[8871335013264524628,"proc_macro2",false,13777591746890017449]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/quote-e5c6cd0fc38d5aea/dep-lib-quote"}}],"rustflags":[],"metadata":2717943770976187624,"config":2202906307356721367,"compile_kind":0}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
02a8b735d14bbac2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"rustc":17954901377634971088,"features":"[]","target":3864195921306431536,"profile":11039742474438789458,"path":1684066648322511884,"deps":[[5910892534286594076,"rand",false,4125034895444323280],[7555800531080362495,"robotics_lib",false,4226435380590821296],[13996853596820760754,"strum",false,15526130247188085527]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/radar-1a8459f9fd12fc41/dep-bin-radar"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file has an mtime of when this was started.
Loading

0 comments on commit bbebbb6

Please sign in to comment.