update doc
Some checks failed
Rust Checks / checks (push) Failing after 1m7s
Rust Checks / checks (pull_request) Failing after 1m5s

This commit is contained in:
CoCo_Sol 2024-02-13 20:45:57 +01:00
parent 9af2d354e7
commit 9a4fb1a5fd

View file

@ -68,6 +68,8 @@ impl HexPosition {
///
/// ## example
/// ```
/// use border_wars::hex::HexPosition;
///
/// let hex1 = HexPosition { q: 0, r: 0 };
/// let hex2 = HexPosition { q: 1, r: 1 };
/// let distance = hex1.distance_to(&hex2);
@ -84,6 +86,8 @@ impl HexPosition {
///
/// ## example
/// ```
/// use border_wars::hex::HexPosition;
///
/// let hex = HexPosition { q: 0, r: 0 };
/// let positions = hex.range(1);
/// assert_eq!(positions.len(), 6);