From 663a4160a2aecbce473abecc632aaa896ef59dd7 Mon Sep 17 00:00:00 2001 From: CoCoSol007 Date: Wed, 14 Feb 2024 18:18:14 +0000 Subject: [PATCH] Changing the structure of map-related programmes (#51) Reviewed-on: https://git.tipragot.fr/corentin/border-wars/pulls/51 Reviewed-by: Tipragot Co-authored-by: CoCoSol007 Co-committed-by: CoCoSol007 --- crates/border-wars/src/lib.rs | 2 +- crates/border-wars/src/{ => map}/hex.rs | 4 ++-- crates/border-wars/src/map/mod.rs | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) rename crates/border-wars/src/{ => map}/hex.rs (97%) create mode 100644 crates/border-wars/src/map/mod.rs diff --git a/crates/border-wars/src/lib.rs b/crates/border-wars/src/lib.rs index e475a9e..db4c6db 100644 --- a/crates/border-wars/src/lib.rs +++ b/crates/border-wars/src/lib.rs @@ -2,7 +2,7 @@ use bevy::prelude::*; -pub mod hex; +pub mod map; pub mod scenes; /// The current scene of the game. diff --git a/crates/border-wars/src/hex.rs b/crates/border-wars/src/map/hex.rs similarity index 97% rename from crates/border-wars/src/hex.rs rename to crates/border-wars/src/map/hex.rs index 83e3776..1aeaa14 100644 --- a/crates/border-wars/src/hex.rs +++ b/crates/border-wars/src/map/hex.rs @@ -39,7 +39,7 @@ impl HexPosition { /// # Example /// /// ```no_run - /// use border_wars::hex::HexPosition; + /// use border_wars::map::hex::HexPosition; /// /// let a = HexPosition { q: 0, r: 0 }; /// let b = HexPosition { q: 1, r: 1 }; @@ -70,7 +70,7 @@ impl HexPosi /// # Example /// /// ``` - /// use border_wars::hex::HexPosition; + /// use border_wars::map::hex::HexPosition; /// /// let position = HexPosition { q: 0, r: 0 }; /// diff --git a/crates/border-wars/src/map/mod.rs b/crates/border-wars/src/map/mod.rs new file mode 100644 index 0000000..515d0c2 --- /dev/null +++ b/crates/border-wars/src/map/mod.rs @@ -0,0 +1,3 @@ +//! Contains all the logic related to the map. + +pub mod hex;