PHP中的深度优先迷宫生成,有人有例子吗?
我正在研究以下算法:
http://en.wikipedia.org/wiki/Maze_ Generation_algorithm #Depth-first_search
并且希望看到 PHP 中的示例实现。我已经看过 Python 和 Javascript 实现,但我无法理解它们如何处理细胞。
I'm studying the following algorithm:
http://en.wikipedia.org/wiki/Maze_generation_algorithm#Depth-first_search
And would love to see a sample implementation in PHP. I have seen the Python and Javascript implementations, but i'm not able to understand how they treat cells.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了以下 php 类:
http://www.bluepearl-skins.com/forums/topic/7288-php-maze-generator-and-solver-using-gd-module/
以及一个简化的程序版本:
http://www.emanueleferonato。 com/2006/08/20/step-by-step-perfect-maze- Generation-with-php/
我希望这有帮助!
I found the following php class:
http://www.bluepearl-skins.com/forums/topic/7288-php-maze-generator-and-solver-using-gd-module/
And a simplified, procedural version:
http://www.emanueleferonato.com/2006/08/20/step-by-step-perfect-maze-generation-with-php/
I hope this helps!