aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorwesley <wesley.werner@gmail.com>2021-07-26 07:18:50 +1000
committerGitHub <noreply@github.com>2021-07-26 07:18:50 +1000
commit1efbbbed996f60ae53934179325376bf11c3b31f (patch)
tree97739cfe58a9d970810bda387d56996c3e41e7f7 /README.md
parent281bc15b671406f785838b2b105d57079f31df38 (diff)
parentfedc1dc38c4a6d3106de88acc1076e1fb2e53720 (diff)
downloadlua-star-1efbbbed996f60ae53934179325376bf11c3b31f.tar.xz
Merge pull request #1 from NickFlexer/exclude_diagonal_moving
added option to disable diagonal movement
Diffstat (limited to 'README.md')
-rw-r--r--README.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/README.md b/README.md
index 3bee2eb..1912d8d 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@ Easy to use, it will make you more attractive and you feel sensual doing so.
return mymap[x][y] == walkable
end
- local path = luastar:find(width, height, start, goal, positionIsOpenFunc, useCache)
+ local path = luastar:find(width, height, start, goal, positionIsOpenFunc, useCache, excludeDiagonalMoving)
`path` will be false if no path was found, otherwise it contains a list of points that travel from `start` to `goal`:
@@ -42,6 +42,8 @@ If at any time you need to clear all cached paths:
luastar:clearCached()
+`excludeDiagonalMoving` also optional value defaults to `false`. If you want to exclude the possibility of moving diagonally set the value `true`. i.e, by default, diagonal movement is **enabled**
+
# Requirements
* [Lua 5.x](http://www.lua.org/)