summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/tile.erl')
-rw-r--r--src/tile.erl7
1 files changed, 5 insertions, 2 deletions
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.