From f633e4d5320806f13b4cffa8dbef0f59a08ae90f Mon Sep 17 00:00:00 2001 From: nsensfel Date: Tue, 21 Nov 2017 17:35:32 +0100 Subject: Server/client disagreement on tile crossing cost. --- src/tile.erl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/tile.erl') diff --git a/src/tile.erl b/src/tile.erl index 2e9f562..cb5811b 100644 --- a/src/tile.erl +++ b/src/tile.erl @@ -8,5 +8,8 @@ ). cost_when_oob () -> 255. -get_cost(N) when (N =< 200) -> N; -get_cost(_N) -> cost_when_oob(). +get_cost (N) -> + if + (N =< 200) -> (N + 1); + true -> cost_when_oob() + end. -- cgit v1.2.3-70-g09d2