I found a probable undesired behavior while running the package:
Steps to reproduce:
Run the following JavaScript code with the package installed:
const eller = require('ellerjs');
const maze = eller(2, 2);
console.log(JSON.stringify(maze, null, 2));
Current result:
[
[
{
"top": true,
"bottom": false,
"left": true,
"right": true,
"_set": 1
},
{
"top": true,
"bottom": false,
"left": true,
"right": true,
"_set": 2
}
],
[
{
"_set": 1,
"right": false,
"left": true,
"bottom": true
},
{
"_set": 1,
"right": true,
"left": false,
"bottom": true
}
]
]
Expected result:
[
[
{
"top": "true|false",
"bottom": false,
"left": true,
"right": true
},
{
"top": "true|false",
"bottom": false,
"left": true,
"right": true
}
],
[
{
"top": "true|false",
"right": false,
"left": true,
"bottom": true
},
{
"top": "true|false",
"right": true,
"left": false,
"bottom": true
}
]
]
As mentioned in the title, the top
property of the cells is not present in the second line, and this is concisely the case for larger mazes. And the internal _set
property can be found in the output generated, being shadowed by the type defined in index.d.ts
.
Thank you in advance!