mirror of
https://github.com/kristoferssolo/hexlab.git
synced 2025-10-21 19:40:34 +00:00
feat(tile): add pos method
This commit is contained in:
parent
9871df523e
commit
971e1c760e
@ -6,7 +6,7 @@ use super::Walls;
|
||||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct HexTile {
|
||||
pos: Hex,
|
||||
pub pos: Hex,
|
||||
pub walls: Walls,
|
||||
}
|
||||
|
||||
@ -25,6 +25,12 @@ impl HexTile {
|
||||
pub fn walls(&self) -> &Walls {
|
||||
&self.walls
|
||||
}
|
||||
|
||||
/// Returns position of the tile
|
||||
#[inline]
|
||||
pub fn pos(&self) -> Hex {
|
||||
self.pos
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Hex> for HexTile {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user