Jump to content




Maze Solver Algorithm

lua utility game

  • You cannot reply to this topic
No replies to this topic

#1 byPhins

  • Members
  • 12 posts
  • LocationGermany

Posted 04 July 2017 - 12:45 AM

Maze solver (download/code):
https://pastebin.com/AfAaVR3P

Usage:
Spoiler

Example:
shell.run("maze_solver")
term.clear()
local image = paintutils.loadImage("image_file")
trnimage = turnImage(image)
paintutils.drawImage(image, 1, 1)
paintutils.drawPixel(2, 2, colors.orange)
paintutils.drawPixel(49, 18, colors.green)
local way = findWay(2, 2, 49, 18, trnimage, colors.white, colors.black)
for i, v in pairs(way) do
   paintutils.drawPixel(v[1], v[2], colors.red)
end
os.pullEvent("char")

Image:
Spoiler

Changelog:
Spoiler

Edited by byPhins, 04 July 2017 - 09:08 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users