add new actions and AI

This commit is contained in:
bridge
2025-08-28 22:25:05 +08:00
parent f7176af935
commit 96615c0c0d
13 changed files with 253 additions and 96 deletions

View File

@@ -18,13 +18,13 @@ def test_simulator_step_moves_avatar_and_sets_tile():
for y in range(3):
game_map.create_tile(x, y, TileType.PLAIN)
world = World(map=game_map)
world = World(map=game_map, year=Year(1), month=Month.JANUARY)
# 将角色放在地图中心,避免越界
avatar = Avatar(
world=world,
name="Tester",
id=1,
id="1",
birth_month=Month.JANUARY,
birth_year=Year(2000),
age=20,
@@ -34,8 +34,8 @@ def test_simulator_step_moves_avatar_and_sets_tile():
)
sim = Simulator()
sim.avatars.append(avatar)
sim = Simulator(world)
sim.avatars["1"] = avatar
# 执行一步模拟
sim.step()