Author Topic: Pipe Game  (Read 2061 times)

lelldorin

  • Guest
Pipe Game
« on: March 07, 2018, 09:47:29 PM »
Do you have any idea how to proof if the user have a complete connection from the sztart to the end?



I have no idea how to proof this. The playground is ready. This game is written in yab (yet another basic on Haiku operating system)

ZXDunny

  • Guest
Re: Pipe Game
« Reply #1 on: March 08, 2018, 11:16:57 AM »
There are many ways to do this, check Wiki: https://en.wikipedia.org/wiki/Pathfinding

A* is efficient and will determine if a path between two points on your grid exists. If you're not terribly worried about speed (or memory consumption) then a simple flood fill will be more than equal to the task - if it completes and the goal position has not been visited, then no path exists.

lelldorin

  • Guest
Re: Pipe Game
« Reply #2 on: March 11, 2018, 06:57:30 PM »
Thanks a lot, i will take a look  :)