snergly
1.0.0
賈米斯·巴克(Jamis Buck)的迷宮中的迷宮算法,用於在克洛傑(Clojure)實施的程序員。
在http://glv.github.io/snergly上查看它。
我將其作為一個有趣的項目,以提高我的Clojure技能。
我想自己完成所有迷宮算法;我已經看到了足夠多的複雜性來處理,我認為這將幫助我解決與克洛的一些鬥爭。
對於我來說,這也是我使用clojurescript和OM玩耍的一個不錯的藉口,構建動態顯示,以顯示迷宮生成算法的作用,從而使算法在處理迷宮時的流動。
Snergly: run and print a maze generation algorithm.
Usage: lein run [options] algorithm
Options:
-c, --cell-size PIXELS 10 Size of maze cells. Ignored when rendering as text.
-d, --distances START Display result maze with distance labels from a starting cell (e.g., 2,2).
-h, --help
-l, --longest Show the longest path through the maze.
-o, --output FILENAME Write output to an image file (format defined by extension)
-p, --path-to END Result maze should show the path from START to END (requires -d).
-s, --size DIMENS [5 5] Grid size (e.g. 5 or 8x5)
Algorithms:
aldous-broder
binary-tree
hunt-and-kill
sidewinder
wilsons
all
為了獲得交互式開發環境:
lein run -m clojure.main script/figwheel.clj
並在Localhost:3449打開您的瀏覽器。這將自動編譯並將所有更改發送給瀏覽器,而無需重新加載。彙編過程完成後,您將獲得一個瀏覽器連接的替補。嘗試它的一種簡單方法是:
(js/alert "Am I connected?")
您應該在瀏覽器窗口中看到一個警報。
清潔所有編譯的文件:
lein clean
創建生產構建運行:
lein cljsbuild once min
並在resources/public/index.html中打開您的瀏覽器。您不會實現重新加載,也不會重新加載。
版權所有©2015 Glenn Vanderburg
根據Eclipse公共許可分發行1.0版或(根據您的選項)任何以後的版本。