{"_id":"@0-harshit-0/maze-generator-and-solver","_rev":"3-e9c66aaa13bae9df5dba8c6cd7106bcc","name":"@0-harshit-0/maze-generator-and-solver","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@0-harshit-0/maze-generator-and-solver","version":"1.0.0","description":"Generate maze using randomized DFS and Solve it using Path Finding algorithms","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/0-harshit-0/maze.git"},"keywords":["maze","maze-generation","maze-soliving","path-finding","dfs","graphs","dijkstra"],"author":{"name":"harshit"},"license":"ISC","bugs":{"url":"https://github.com/0-harshit-0/maze/issues"},"gitHead":"c89a3d28d7707087dcdf8ab06b0c62f3cfd6ce2d","homepage":"https://github.com/0-harshit-0/maze#readme","_id":"@0-harshit-0/maze-generator-and-solver@1.0.0","_nodeVersion":"16.13.2","_npmVersion":"8.13.1","dist":{"integrity":"sha512-tf2bgRmwbRVNpD1y6Rld7KD7h2Czj1JwuAV52jWjatKvGO3InHXzQZaXpaUTdPFGdgh9VXYKXfdaWr51QUvupQ==","shasum":"9a2d8d61cf68e82dbe8e87345e085d503b9dfd28","tarball":"https://registry.npmjs.org/@0-harshit-0/maze-generator-and-solver/-/maze-generator-and-solver-1.0.0.tgz","fileCount":3,"unpackedSize":10541,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID160XrXr1t0xylaFhbdeTyb0v20uv88kSOAEIf6InzHAiEAyUYHoagKnbTvhMu6rsxZwD4Pltb3lV142Es9VHHAqtw="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgm0mACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqPvg/6A1ueS1OT06VqfL7SQG3Hze3++Ob4CD1+CmLhHf9BE/Pfaazh\r\nDkFbkAG+Ao4gE/pZGF9PLzUQl9UaLB5dUGTKTZeGXJ0eP0eHv+3pa3pr2iH/\r\nm4a2hKkBt3Z02mc6Kziz3uIhpxDKzi80sp42QUPYfgjwFR7NvMfXm9MzZ3WG\r\nJK/RR9acliStvfpZgdBcHber6QoUOFEmVT9czPRbdRddAbYhuYI+9+FCs/J6\r\nAGlfqPclsW71VFmr9QanELWnLiWMjgqd1DRyeUFVTuqkiNNC5QUubP8iL8Zo\r\n+rXkpJEsD6wR6ImKsOpU5CIVFtGjOCcySgNqyDF26Fdvj3Wo2fEWRUbAPEZp\r\n6bUOFu5xjqyMqMl57zLGLMMXgpjBHDzRAAXh4j6Cs7fvN2e0xPW94fvfnMtS\r\nORc3gRfgLn3pmNVau5YmhuFBFy7DXMNeN6tGV5PqlqL5f2NE+kPTsL2NaV2p\r\nwq10vIelGgXYqXXNkhDcd+EMVUD9U7lbXVH1nh4pn2lJcLl3lbMkB/QazhLD\r\nWGOmg5TNMGNrQrKj0arnBwsRrkMOwg2M/WIocKsdUbzcxV/c6SPMySiRAYQf\r\nxv/onRDHBK1CXKazWsFa9P1HYeTx+1a/SxNa+J1Y0p63e78ggdeIntt0XQWJ\r\nfDQ5/x/5K5SweAljprVG6JIpBxfENytgFHg=\r\n=uyc9\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"0-harshit-0","email":"harshitw3b@gmail.com"},"directories":{},"maintainers":[{"name":"0-harshit-0","email":"harshitw3b@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/maze-generator-and-solver_1.0.0_1669492006727_0.9278971049539699"},"_hasShrinkwrap":false},"1.0.1":{"name":"@0-harshit-0/maze-generator-and-solver","version":"1.0.1","description":"Generate maze using randomized DFS and Solve it using Path Finding algorithms","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/0-harshit-0/maze.git"},"keywords":["maze","maze-generation","maze-soliving","path-finding","dfs","graphs","dijkstra"],"author":{"name":"harshit"},"license":"ISC","bugs":{"url":"https://github.com/0-harshit-0/maze/issues"},"gitHead":"d5c9d96ec117d364a1c99b9d174f5847e4de12f6","homepage":"https://github.com/0-harshit-0/maze#readme","_id":"@0-harshit-0/maze-generator-and-solver@1.0.1","_nodeVersion":"16.13.2","_npmVersion":"8.13.1","dist":{"integrity":"sha512-0FmPoBiPllHEOixUea0OnLgBuvuiAlVnUZuejxSfP6zEaZsFmE2YTNXG0CW6CiVu4DNQ8158pA8eTnYCsqQgLg==","shasum":"3f817a95fae01dca3bdc41223d8eed732ede2581","tarball":"https://registry.npmjs.org/@0-harshit-0/maze-generator-and-solver/-/maze-generator-and-solver-1.0.1.tgz","fileCount":3,"unpackedSize":9649,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICkJHEzH9jizEFT/KGnkMAHUd0glkGsVAikTZoeWt0exAiAF9xpVXm3h2k8j3YVI/K67h3urQze1xQCsGWbfVNgHZA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjiK7sACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpN0g//cJiCVEQAz2Yyo8NGWZ26ibCI9Oo5Ce7Et2AAu92zT76PhcWP\r\nqpUDjdX9g5Z2BCH5s5e+ap8FE1m2DSnFrmR59ew64TK4NGmZv62f+JmvUBoX\r\nrhpBu1Fxvn3UN1yScDl/UpVilEp1/m2Zc0jMuKWpRGX9y2cSYz0Hv+8tQ5bh\r\nTQe/Jj/dZO43UoXukpGL0IjjxM/fk85m77EQ5jgQg7Ur5AwOB4ulUJuQih9r\r\nc/HvIlaPS4ZJxKciWW6CauJ8q0tqp0EQ1wrCwpO8tAdJbbNQU35D6P/1aUzA\r\nCKhPWOBc2+cIRwaoqYGvi6rYi8A3n4Rm2HqOxbwnDeZPiarZdv9zD5pf5Lik\r\no6W4ZUsyLhJCdVoRjHo+aKJjYlD3BE/bG34GvpYGUtyacZoawCIssfHBIhWc\r\nQkOAN2+uePWbr0W19vaW3sxW4IjmqJfm/r7FK4iJd4xj9jHk/7G1nrs46Cl/\r\nh/HX3L+yrJhshuxUWCzIF+F7+T13fuEfU3yitGUIj4FdkBR9XYBHCEdCeJUK\r\nDgkX/QuZ2i9XBwGU78ryK3vkMuU1Q/9E4M6mo//JvhKPLrKBS9lIKBbuU7Bs\r\naOvvrlC58pz5JneAJ9YBTZbBSPIxO1DtnZSb5YW8j2ZVkeSoKlsne0fsYxsA\r\naeSUa/B4hiSawma1a+BKZWLFdSepLCm69cs=\r\n=gj3J\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"0-harshit-0","email":"harshitw3b@gmail.com"},"directories":{},"maintainers":[{"name":"0-harshit-0","email":"harshitw3b@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/maze-generator-and-solver_1.0.1_1669902060017_0.40657205615847625"},"_hasShrinkwrap":false},"1.0.2":{"name":"@0-harshit-0/maze-generator-and-solver","version":"1.0.2","description":"Generate maze using randomized DFS and Solve it using Path Finding algorithms","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/0-harshit-0/maze.git"},"keywords":["maze","maze-generation","maze-soliving","path-finding","dfs","graphs","dijkstra"],"author":{"name":"harshit"},"license":"ISC","bugs":{"url":"https://github.com/0-harshit-0/maze/issues"},"gitHead":"485244cda26b4a6f162b0cdc37f0031803a1fa99","homepage":"https://github.com/0-harshit-0/maze#readme","_id":"@0-harshit-0/maze-generator-and-solver@1.0.2","_nodeVersion":"16.13.2","_npmVersion":"8.13.1","dist":{"integrity":"sha512-14h8w1fJMSkYmvqzFeUVseL3faAl/kKNIxqz2ALfw3DWZbSrySvlJU+1gJN5TLOYuXxjC2AHaypE/Clnu7H3bQ==","shasum":"3fdb1479a2184c888a959c07ad027f1186e6b555","tarball":"https://registry.npmjs.org/@0-harshit-0/maze-generator-and-solver/-/maze-generator-and-solver-1.0.2.tgz","fileCount":3,"unpackedSize":10474,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxQYdTxmVJhQwRNgs9O1ljORoJasSZOCWJ9MUpiB1mTQIhAIdOkOz7mQ3WN4FB++GLu1vFWCzKYxt+OGGVX6yYGPNl"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjk5rDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrIMw/9HEJCbSU6fsEwf7s2w0ZpicaAgm6VSGjK4tQg6yHp4p8xdjco\r\ns7mTXyQvrEoIr/pr6aLkukqLqHaiG/atDujPjZBuFOuCXiy+I3LI2J5XPJQj\r\n+YJQLZ/rQz+QiVDNEMd9W7gXdVM8p7b7GtDg0fqn4FKtb9v3FXB9PHphG+E9\r\ngMMe0rXJ71m3w9OMdJh0Yz+WAReydF3jfhsTxdcjDMxOYf62pJcPMOk56LI6\r\nsvbDVPMrF3jErAY042sXZlxk/KAxfSgqB3MUvSTpv3ZNx41YIfa88OikbObN\r\n7W0+6rAfJW4Y5axS3a2qyP8uivoSFLoMvP2/l/SZpMCxHbjBpH3oxmcBwuET\r\nRzsKFZDaW485GJmxE6bV5M7iwCVqCJnbBtS+Z2ggoyOVLRs27zHxTaomEkuF\r\nImXeKhHfyNtd5jsbcD7wXgKDS3DgySZ2Nbqap78VKRKEd1V6ADEL/HnNxASi\r\nB4lqmqO3lTi/YiCrwToSYpbX5+uuf0ppnNRGMlRO38xA7pK+f/r25TykL0Kr\r\nrC387g5//vmAH3rm1g7rfR/umzqP2+mmppmAlkZ8agOZ3IfA4nRAkLrxzs2F\r\nXCV14sNiaNXHFb3+O0P1p2w8D36qfL2ioJJxQSGFMmGcfem2+In/KX1v+r5u\r\nCmXQxNbvYvqbFP+F2hCuURtqQNCqMqoA1ZQ=\r\n=ukeG\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"0-harshit-0","email":"harshitw3b@gmail.com"},"directories":{},"maintainers":[{"name":"0-harshit-0","email":"harshitw3b@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/maze-generator-and-solver_1.0.2_1670617795298_0.05924229159678518"},"_hasShrinkwrap":false},"1.0.3":{"name":"@0-harshit-0/maze-generator-and-solver","version":"1.0.3","description":"Generate maze using randomized DFS and Solve it using Path Finding algorithms","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/0-harshit-0/maze.git"},"keywords":["maze","maze-generation","maze-soliving","path-finding","dfs","graphs","dijkstra"],"author":{"name":"harshit"},"license":"ISC","bugs":{"url":"https://github.com/0-harshit-0/maze/issues"},"gitHead":"1ad68d240ac09f0f1a3cd1210180d71fa905f93e","homepage":"https://github.com/0-harshit-0/maze#readme","_id":"@0-harshit-0/maze-generator-and-solver@1.0.3","_nodeVersion":"16.13.2","_npmVersion":"8.13.1","dist":{"integrity":"sha512-nNLVwBOrA2lfjQi9CRc27DIHipDb31pyrFHmsEUjxcO+wLahChhx3K2wvwXClnsswII+kLT6ur2gIErJ8i1NmA==","shasum":"5068346c5b68b987151540666ab8de8bc44f2b51","tarball":"https://registry.npmjs.org/@0-harshit-0/maze-generator-and-solver/-/maze-generator-and-solver-1.0.3.tgz","fileCount":3,"unpackedSize":10581,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGk0epjuISyUPsStrS6oZ5bVs3fq5iDF+GdoHkUHcUD9AiBiASbfsv/mOwSfbFmbqQeCa2lIdl7TXvB7k41qwSUrkA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjlBvJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr0sQ/+JIVhEwpcjkTFgsZfzMe549HSZWEQ6j7tX1lh8NIX3M98mkhR\r\n76xB+O6gHN5GAQ1tg2LSNCNqdZpIuWsCyZUXWRT1KK8YImvL8iOXeO51BZzi\r\nQ5xfWCCcdPwCdqhycvGoBbrSE8LP6yfUo7woAMGcPu4+kaAKjsmap2jyJUu1\r\nKdAla/PaRLz+Xs4FrK60NJTPHxQzq1k0j/ir2FIDEQREUzZGqRLL2gShkRsV\r\neBEa5bWuuw3DZNDEqmKlpvymN+MoJ2MMUJ6v3LjOc3hNJFN9j++ElJdXQagZ\r\nXUl9HQs7deAfwxjZBiiY9wTaQLHOZBTmcBnZTSBIjDgp5m5dit6SVgD3ZWjB\r\nZAwx/6ajweby4ZxIGj+GQ6PwstuNpgx/LP9QBq/vRNR9pcunmR6vfR85vF0K\r\nIEduT6n+x6BCzORIvmXwmXvcuPdwcEY11DfRJY5C4eE/c0aujIMNrX7g/8UZ\r\ndqIMG/TEFjfluuxAjehvy7xu1IDv2RSMFcH1WYwds40KMMQBebFCXKAskVzj\r\nadTcuMX4+fSwiMQoBzKgWbX0Kml5zNENmQn9CCJeznoS0T9pHwY9S7vvJ2m5\r\nX3ZdJEbEdBZwWm0pUo6SE1gDiUqWko1A0QZ4odXuQ2B7N7hCfVudqehIkNkw\r\nD4JqpeCsnTsgHyl7Ztp9I6stEbv18c/S9QU=\r\n=+XOt\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"0-harshit-0","email":"harshitw3b@gmail.com"},"directories":{},"maintainers":[{"name":"0-harshit-0","email":"harshitw3b@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/maze-generator-and-solver_1.0.3_1670650825632_0.9695014375250028"},"_hasShrinkwrap":false}},"time":{"created":"2022-11-26T19:46:46.661Z","1.0.0":"2022-11-26T19:46:46.916Z","modified":"2022-12-10T05:40:25.898Z","1.0.1":"2022-12-01T13:41:00.231Z","1.0.2":"2022-12-09T20:29:55.477Z","1.0.3":"2022-12-10T05:40:25.818Z"},"maintainers":[{"name":"0-harshit-0","email":"harshitw3b@gmail.com"}],"description":"Generate maze using randomized DFS and Solve it using Path Finding algorithms","homepage":"https://github.com/0-harshit-0/maze#readme","keywords":["maze","maze-generation","maze-soliving","path-finding","dfs","graphs","dijkstra"],"repository":{"type":"git","url":"git+https://github.com/0-harshit-0/maze.git"},"author":{"name":"harshit"},"bugs":{"url":"https://github.com/0-harshit-0/maze/issues"},"license":"ISC","readme":"# Maze Generation & Solving\r\nGenerate/Solve Maze of any dimension using DFS and search algorithms like, Dijkstra, etc.\r\n\r\n\r\n## Features\r\n- Create maze of different sizes.\r\n- Solve maze using path finding algorithm like Dijkstra(adding more later).\r\n\r\n\r\n## Usage\r\nThis module provides 2 functions, create(...) and search(...). Both of these functions require some parameter that needs to be given by the user.\r\nLet's start by importing the module, depending on what kind of project it is:\r\n```js\r\nconst mgs = require(\"@0-harshit-0/maze-generator-and-solver\") // react, node etc.\r\nimport {create, search} from 'https://cdn.jsdelivr.net/gh/0-harshit-0/maze/packages/index.min.js'; // direct in .js file (usually in static webpages).\r\n```\r\n\r\n### Generate/Create a maze\r\nThere are 2 ways of using the create(...) function to generate a maze, both of them return same structure so you can use either of them as per the need.\r\n```js\r\n//definition:\r\ncreate(width=3, height=3, cellSize=1) /* width (default: 3), height (default: 3), cellsize (default: 1) */\r\n```\r\n\r\n- The create(...) function returns 2 structure, one is a simple 1D Array and the other one is a custom Graph structure.\r\n  - The array contains maze/grid index in the order they should be visited (including bactracked indexes). This is useful if you want to create some kind of animation to create a maze.\r\n  - The Graph, as the name suggest, will return an object that has a Map object(adjList). This Map object maps all the index connected to each other.\r\n\r\nNOTE: create(...) use randomized DFS, so a (3x3) maze created on your system might return some different values.\r\n```js\r\n//use:\r\nlet maze = create(3, 3) /* to create a maze of (3 x 3) grid */\r\nlet maze = create(90, 90, 30) /* to create a maze of (3 x 3) grid */\r\n/* output of both the function call will be similar to this:\r\n  {\r\n    \"mazeArr\": [0,3,6,7,8,5,2,1,4,1,2,5,8,7,6,3,0],\r\n    \"mazeGraph\": {\r\n        \"v\": 9,\r\n        \"AdjList\": {},\r\n        \"length\": 9\r\n    }\r\n  }\r\n*/\r\n\r\nlet maze = create(3, 5) /* to create a maze of (3 x 5) grid */\r\nlet maze = create(90, 150, 30) /* to create a maze of (3 x 5) grid */\r\n/* output of both the function call will similar to this\r\n  {\r\n    \"mazeArr\": [0,3,4,7,6,9,12,13,10,11,14,11,8,5,2,1,2,5,8,11,10,13,12,9,6,7,4,3,0],\r\n    \"mazeGraph\": {\r\n        \"v\": 15,\r\n        \"AdjList\": {},\r\n        \"length\": 15\r\n    }\r\n  }\r\n*/\r\n\r\n/* all these functions return the same structures, an array and a Graph object*/\r\n```\r\nclick <a href=\"#example\">here</a> or scroll down to get a better understanding with the help of an example\r\n\r\n### Solve the maze\r\nTo search/solve the maze use the search(...) function,\r\n```js\r\n//definition:\r\nsearch(graph, root, target, searchAlgoId=1)\r\n/* graph: the graph object returned by 'create(...) function', root: starting index, */\r\n/* target: ending index, searchAlgoId: the id the search algorithm being used (default: 1[dijkstra]) */\r\n```\r\n\r\n- The search(...) function returns a custom Stack object, it contains the array(stackArray) that will provide the solution / path to take from root(0) to target(8).\r\n```js\r\n//use:\r\n// 'maze' was defined above when create function was called\r\nlet path = search(maze.mazeGraph, 0, maze.mazeGraph.v-1) /* retuns a stack object that contains the solution/path */\r\n/*\r\noutput of a 3x3 maze will be similar to:\r\n[0,1,4,7,8]\r\noutput of a 3x5 maze will be similar to:\r\n[0,3,6,7,8,11,14]\r\n*/\r\n```\r\nclick <a href=\"#example\">here</a> or scroll down to get a better understanding with the help of an example\r\n\r\n#### Search Algorithm IDs\r\n<table>\r\n  <tr>\r\n    <th>Algorithm ID</th>\r\n    <th>Search Algorithm</th>\r\n  </tr>\r\n  <tr>\r\n    <td>1</td>\r\n    <td>Dijkstra</td>\r\n  </tr>\r\n</table>\r\nMore algorithms will be added soon :stuck_out_tongue_winking_eye: .\r\n\r\n\r\n## Example\r\nTaking this (3x3)maze as an example. on the left(unsolved) and on the right, you can see it is solved.\r\n<img alt=\"maze\" src=\"./assets/maze-npm.png\" />\r\n\r\nNOTE: create(...) use randomized DFS, so a (3x3) maze created on your system might return some different values.\r\n\r\ncreate:\r\n```js\r\nlet maze = create(3, 3)\r\n// mazeArray: [0,1,4,5,8,7,6,3,6,7,8,5,2,5,4,1,0]\r\n```\r\nsearch: \r\n```js\r\nlet path = search(maze.mazeGraph, 0, maze.mazeGraph.v-1)\r\n//stackArray: [0,1,4,5,8]\r\n```\r\n\r\nThat's it, you are ready to create and solve maze :smile:. You can play with a working maze generator/solver at https://0-harshit-0.github.io/maze\r\n","readmeFilename":"README.md"}