{"id":16225917,"url":"https://github.com/bestguy/generate-maze","last_synced_at":"2025-03-19T13:30:24.933Z","repository":{"id":48460951,"uuid":"60046002","full_name":"bestguy/generate-maze","owner":"bestguy","description":"Maze generator using a JavaScript implementation of Eller's Algorithm","archived":false,"fork":false,"pushed_at":"2021-07-24T22:57:27.000Z","size":325,"stargazers_count":30,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-09T15:35:41.713Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bestguy.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-31T00:14:33.000Z","updated_at":"2025-02-01T21:02:46.000Z","dependencies_parsed_at":"2022-09-17T17:51:22.459Z","dependency_job_id":null,"html_url":"https://github.com/bestguy/generate-maze","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestguy%2Fgenerate-maze","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestguy%2Fgenerate-maze/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestguy%2Fgenerate-maze/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestguy%2Fgenerate-maze/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bestguy","download_url":"https://codeload.github.com/bestguy/generate-maze/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243989576,"owners_count":20379648,"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-10T12:46:55.263Z","updated_at":"2025-03-19T13:30:24.544Z","avatar_url":"https://github.com/bestguy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# generate-maze\n\nMaze generator using a JavaScript implementation of Eller's Algorithm, \nas described here: http://www.neocomputer.org/projects/eller.html\n\nThis algorithm creates 'perfect' mazes, which guarantees a single path \nbetween any two cells, such as:\n\n    +---+---+---+---+---+---+---+\n    |           |           |   |\n    +---+   +---+   +   +   +   +\n    |   |   |       |   |       |\n    +   +   +   +   +   +   +   +\n    |       |   |   |   |   |   |\n    +   +---+   +   +---+---+   +\n    |   |   |   |   |   |   |   |\n    +   +   +   +   +   +   +   +\n    |   |       |   |   |       |\n    +   +---+   +---+   +---+---+\n    |   |   |   |       |       |\n    +   +   +   +   +---+   +   +\n    |                       |   |\n    +---+---+---+---+---+---+---+\n    \nAnother [Web example](https://svelte.dev/repl/7eb34401ec0c42d3bb47d2cdbc58f926?version=3.38.2)\n\n**Note: This library does not create ASCII-art or other text visualizations.  \nThat part is up to you.**\n\nThis library generates a two-dimensional array of maze cells, each with the following properties:\n\n``` js\n    {\n      x: 4,          // Horizontal position, integer\n      y: 7,          // Vertical position, integer\n      top: false,    // Top/Up has a wall/blocked if true, boolean \n      left: false,   // Left has a wall/blocked if true, boolean\n      bottom: true,  // Bottom/Down has a wall/blocked if true, boolean\n      right: true,   // Right has a wall/blocked if true, boolean\n      set: 5         // Set # used to generate maze, can be ignored\n    }\n```\n\n## Installation\n\n`npm install generate-maze`\n\n## Usage\n\n_Example assumes you are using a module system such as node, Webpack or Browserify._\n\n```javascript\nconst generator = require('generate-maze');\n\n// Width and height == 4\nconst maze = generator(4);\n\n// Width == 8, height == 4\nconst maze = generator(8, 4);\n\n// Width == 8, height == 4, maze edges are open\nconst maze = generator(8, 4, false);\n\n// Width == 8, height == 4, maze edges are closed, using random seed \nconst maze = generator(8, 4, true, 123456);\n\n```\n\n\n\n_Note: the maze is an array of rows, so to access individual cells by their x/y\npositions, you need to specify the row first.  For example:\n\n    maze[y][x]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbestguy%2Fgenerate-maze","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbestguy%2Fgenerate-maze","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbestguy%2Fgenerate-maze/lists"}