Push large tiles upwards back into the grid

This commit is contained in:
Robin Townsend 2023-06-17 15:21:38 -04:00
commit 8b8d6fd0e0
3 changed files with 199 additions and 19 deletions

View file

@ -169,6 +169,50 @@ dddd
iegh`
);
testFillGaps(
"keeps a large tile from hanging off the bottom",
`
abcd
efgh
ii
ii`,
`
abcd
iigh
iief`
);
testFillGaps(
"pushes a chain of large tiles upwards",
`
abcd
e fg
hh
hh
ii
ii`,
`
hhcd
hhfg
aiib
eii`
);
testFillGaps(
"gives up on pushing large tiles upwards when not possible",
`
aabb
aabb
cc
cc`,
`
aabb
aabb
cc
cc`
);
function testCycleTileSize(
title: string,
tileId: string,