文件名称:pathfinding:Lua 中的 A* 寻路
文件大小:24KB
文件格式:ZIP
更新时间:2024-07-20 02:07:03
Lua
Lua中的A*寻路算法 一般用法: local mapGenerator = require ' map ' local mapSolver = require ' mapSolver ' local map = mapGenerator { width = 25 , height = 25 , entry = {x = 15 , y = 7 }, exit = {x = 23 , y = 11 }, } -- generate a map map. generate () -- prepare map pathfinding solver local solver = mapSolver (map) local solve = solver. solve () local validPath local solver = mapSolver (map) local solve
【文件预览】:
pathfinding-master
----.gitignore(88B)
----serpent.lua(8KB)
----doc()
--------pathfinding0.png(14KB)
----map.lua(2KB)
----map2D.lua(1KB)
----README.md(887B)
----tests()
--------map.bin(1KB)
--------test.lua(2KB)
--------console.lua(2KB)
----mapSolver.lua(4KB)
----pqueue.lua(2KB)