{"id":15540321,"url":"https://github.com/rm-hull/maze","last_synced_at":"2025-04-23T16:43:54.039Z","repository":{"id":145431014,"uuid":"6971552","full_name":"rm-hull/maze","owner":"rm-hull","description":"Maze generator and solver, in ClojureScript with a HTML5 canvas","archived":false,"fork":false,"pushed_at":"2014-01-01T15:11:51.000Z","size":319,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-03T12:17:45.344Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"maze.destructuring-bind.org","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rm-hull.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-12-02T20:02:51.000Z","updated_at":"2019-06-09T00:05:33.000Z","dependencies_parsed_at":"2023-03-22T20:59:02.924Z","dependency_job_id":null,"html_url":"https://github.com/rm-hull/maze","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm-hull%2Fmaze","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm-hull%2Fmaze/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm-hull%2Fmaze/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm-hull%2Fmaze/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rm-hull","download_url":"https://codeload.github.com/rm-hull/maze/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250472238,"owners_count":21436105,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T12:13:31.426Z","updated_at":"2025-04-23T16:43:54.023Z","avatar_url":"https://github.com/rm-hull.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# maze\n\nMaze generator and solver, served up with functional Clojure \u0026 Noir, and\nfront-end fun in ClojureScript with rendering using HTML5 canvas. See here\nfor some variations:\n\n* http://maze.destructuring-bind.org - default maze generator.\n\n* http://maze.destructuring-bind.org?draw=path - default maze generator \u0026 solver.\n\n* http://maze.destructuring-bind.org?draw=snake\u0026cell-size=6\u0026count=5 - snake solver.\n\n* http://maze.destructuring-bind.org?draw=snail\u0026cell-size=6 - snail-trails.\n\n[Works on Chromium, Firefox, iPad - haven't tried the others - feedback welcome]\n\n## TODO\n\n* Follow the mouse clicks - when in snake or trails mode, clicking/tapping\n  on the maze will cause the path to be re-evaluated with the end point at\n  that mouse click.\n\n* iPad game: roll a ball round the maze \u0026 against the clock -- device \n  orientation and motion API integration\n\n## Implementation details\n\nThe core generator algorithm loosely based on the pseudo-code presented at\nhttp://www.mazeworks.com/mazegen/mazetut/ and the ruby code at \nhttp://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/141783, but is\npurely functional in nature (i.e. no mutating state). In order to generate\nrandom pathways, a visitor higher-order function is required when the \ngenerator is called.\n\nThe generated mazes are random, and each is a perfect maze, in-as-much as \nthere is always a path between every two points and there are no islands, \nfor example:\n\n    +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+\n    | # |           |               |                   |                   |       |\n    +   +---+---+   +   +---+   +   +---+   +---+---+   +---+---+   +---+   +---+   +\n    | #   #   # |   |   |       |       |   |       |               |   |       |   |\n    +---+---+   +   +   +   +---+---+   +   +   +---+---+---+---+---+   +---+   +   +\n    |       | # |       |       |       |   |               |               |       |\n    +   +   +   +---+---+---+   +---+   +   +---+---+   +   +   +---+---+   +---+   +\n    |   |   | #   # | #   # |       |       |       |   |   |   |               |   |\n    +   +   +---+   +   +   +   +   +---+---+   +   +---+   +   +   +---+---+---+   +\n    |   |       | #   # | # |   |               |       |   |   |                   |\n    +   +---+   +---+---+   +   +---+---+---+---+---+   +   +   +---+---+   +---+---+\n    |   |       | #   #   # |           |   |           |       |       |           |\n    +   +---+---+   +---+---+---+---+   +   +   +   +---+---+---+   +   +---+---+---+\n    |           | #   # | #   # |           |   |   |               |               |\n    +   +---+   +---+   +   +   +---+---+---+   +---+   +---+---+---+---+   +---+   +\n    |       |       | #   # | # | #   #   # |                   |       |       |   |\n    +---+   +---+   +---+---+   +   +---+   +   +---+---+---+---+   +   +---+---+   +\n    |   |       |           | #   # |   | # |       |       |       |           |   |\n    +   +   +---+   +   +---+---+---+   +   +---+---+   +   +   +---+---+---+   +   +\n    |   |   |       |   |       | #   #   # |       |   |       |       |       |   |\n    +   +   +   +---+---+   +   +   +---+---+   +   +   +   +---+   +   +   +---+   +\n    |       |               |   | # |           |       |   |       |   |   |       |\n    +   +---+---+---+---+---+   +   +   +---+   +---+---+---+   +---+   +   +---+   +\n    |   |           |           | # |   |   |               |       |   |           |\n    +   +   +---+   +   +---+---+   +   +   +---+---+---+   +---+   +   +---+---+---+\n    |   |   |       |       | #   # |   |       | #   # |           |               |\n    +   +   +---+---+---+   +   +---+   +   +   +   +   +---+---+---+---+---+---+   +\n    |       |               | # |   |       |   | # | #   #   #   #   #   # |       |\n    +   +---+   +---+---+---+   +   +---+---+   +   +---+---+---+---+---+   +   +   +\n    |   |       | #   #   #   # |               | #   # |   |           | # |   |   |\n    +---+   +---+   +---+---+---+---+---+---+---+---+   +   +   +   +   +   +   +   +\n    |       | #   # |     #   #   #   #   #   #   #   # |       |   |   | # |   |   |\n    +   +---+   +---+---+   +---+---+---+---+---+---+---+---+---+   +   +   +   +---+\n    | #   # | # |     #   # |               |       |               |   | # |       |\n    +   +   +   +   +   +---+   +---+---+   +   +   +   +---+---+---+---+   +---+   +\n    | # | #   # |   | # |       |               |       |       | #   #   # | #   # |\n    +   +---+---+---+   +   +   +---+   +---+---+---+---+   +   +   +---+---+   +   +\n    | #   # | #   #   # |   |       |       |       |       |   | # |     #   # | # |\n    +---+   +   +---+---+   +---+   +---+---+   +   +   +---+   +   +---+   +---+   +\n    |     #   # |               |               |           |     #   #   # |     # |\n    +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+\n\n## Usage\n\nRun locally in development mode with `lein run` and browse to http://localhost:8080.\nNote, requires leiningen 2.0\n\n## References\n\n* http://christian-helle.blogspot.co.uk/2012/03/accessing-accelerometer-from-html5-and.html\n\n* http://menscher.com/teaching/woaa/examples/html5_accelerometer.html \n\n* http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/141783\n \n* http://www.mazeworks.com/mazegen/mazetut/\n\n* http://lukevanderhart.com/2011/09/30/using-javascript-and-clojurescript.html\n\n\n\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rm-hull/maze/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frm-hull%2Fmaze","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frm-hull%2Fmaze","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frm-hull%2Fmaze/lists"}