Brought over a bunch of code from the roguelike and now will use it to generate a random map.
This commit is contained in:
parent
8d3d3b4ec3
commit
2daa1c9bd5
59 changed files with 4303 additions and 411 deletions
60
tests/dijkstra.json
Normal file
60
tests/dijkstra.json
Normal file
|
@ -0,0 +1,60 @@
|
|||
[{
|
||||
"input": [
|
||||
[1, 1, 1, 0],
|
||||
[1, 0, 1, 1],
|
||||
[1, 0, 1, 1],
|
||||
[1, 1, 1, 1]
|
||||
],
|
||||
"walls": [
|
||||
[0, 0, 0, 0],
|
||||
[0, 0, 0, 0],
|
||||
[0, 0, 1, 0],
|
||||
[0, 0, 1, 0]
|
||||
],
|
||||
"expected": [
|
||||
[1, 1, 1, 0],
|
||||
[1, 0, 1, 1],
|
||||
[1, 0, 1000, 2],
|
||||
[1, 1, 1000, 3]
|
||||
]
|
||||
},{
|
||||
"input": [
|
||||
[1, 1, 1, 0],
|
||||
[1, 0, 1, 1],
|
||||
[1, 0, 1, 1],
|
||||
[1, 1, 1, 1]
|
||||
],
|
||||
"walls": [
|
||||
[0, 0, 0, 0],
|
||||
[0, 0, 0, 0],
|
||||
[0, 0, 1, 0],
|
||||
[0, 0, 1, 0]
|
||||
],
|
||||
"expected": [
|
||||
[1, 1, 1, 0],
|
||||
[1, 0, 1, 1],
|
||||
[1, 0, 1000, 2],
|
||||
[1, 1, 1000, 3]
|
||||
]
|
||||
},
|
||||
{
|
||||
"input": [
|
||||
[1, 1, 1, 0],
|
||||
[1, 1, 1, 1],
|
||||
[1, 0, 1, 1],
|
||||
[1, 1, 1, 1]
|
||||
],
|
||||
"walls": [
|
||||
[0, 0, 0, 0],
|
||||
[0, 0, 0, 0],
|
||||
[0, 0, 1, 0],
|
||||
[0, 0, 1, 0]
|
||||
],
|
||||
"expected": [
|
||||
[2, 2, 1, 0],
|
||||
[1, 1, 1, 1],
|
||||
[1, 0, 1000, 2],
|
||||
[1, 1, 1000, 3]
|
||||
]
|
||||
}
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue