test: geometry and slope collision coverage

This commit is contained in:
dualfroz committed 2026-08-27 23:06:01 +02:00
1 parent a0222105d7
commit 1952538952
4 files changed
+161

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
from game.sim.level import parseAscii
from game.sim.world import World
from game.sim.inputCommand import InputCommand
def makeLevel(lines, name="test"):
return parseAscii(name, lines)
def makeWorld(lines, name="test"):
return World(parseAscii(name, lines))
def command(**kwargs):
return InputCommand(**kwargs)
def stepWorld(world, times=1, **kwargs):
cmd = InputCommand(**kwargs)
for _ in range(times):
world.step(cmd)
return world
def settle(world, times=30):
for _ in range(times):
world.step(InputCommand())
return world