diff options
| author | troido <troido@protonmail.com> | 2020-04-13 15:58:49 +0200 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-04-13 15:58:49 +0200 |
| commit | 4b116789bef06adcdb98f2a17cbf41d5b375ecb9 (patch) | |
| tree | 6401689d7797d3fdd62081d37b929b927ca0d502 /src/pos.rs | |
| parent | e8088a736a48cfb650df7f7a8f69e3e91922ca57 (diff) | |
if position is blocked, loot drops in adjacent positions
Diffstat (limited to 'src/pos.rs')
| -rw-r--r-- | src/pos.rs | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -18,6 +18,11 @@ impl Pos { Pos {x, y} } + pub fn from_tuple(p: (i64, i64)) -> Pos { + let (x, y) = p; + Pos {x, y} + } + #[allow(dead_code)] pub fn clamp(self, smaller: Pos, larger: Pos) -> Pos { Pos { |
