feat: complete playtest parity improvements
This commit is contained in:
@@ -2,16 +2,17 @@ extends GutTest
|
||||
|
||||
const GameScene = preload("res://scenes/Game.tscn")
|
||||
|
||||
func test_initial_demo_map_is_30_by_20_with_a_known_door_chest_and_stairs_route() -> void:
|
||||
func test_initial_level_is_the_reference_surface_not_the_old_demo_map() -> void:
|
||||
var game := GameScene.instantiate() as Game
|
||||
add_child_autofree(game)
|
||||
await get_tree().process_frame
|
||||
var state := game.get_game_state()
|
||||
|
||||
assert_eq(state.map.size, Vector2i(30, 20))
|
||||
assert_eq(state.player.cell, Vector2i(4, 12))
|
||||
assert_eq(state.map.get_cell(Vector2i(4, 11)), GridMapState.CellKind.CLOSED_DOOR)
|
||||
assert_eq(state.map.get_cell(Vector2i(4, 7)), GridMapState.CellKind.CHEST)
|
||||
assert_eq(state.map.get_cell(Vector2i(18, 4)), GridMapState.CellKind.STAIRS)
|
||||
for cell in [Vector2i(4, 10), Vector2i(4, 8), Vector2i(4, 6), Vector2i(10, 4), Vector2i(17, 4)]:
|
||||
assert_true(state.map.is_walkable(cell), "Expected the demo route to include %s." % cell)
|
||||
assert_eq(state.map.size, Vector2i(42, 16))
|
||||
assert_eq(state.player.cell, Vector2i(4, 7))
|
||||
assert_eq(state.map.get_cell(Vector2i(36, 7)), GridMapState.CellKind.CLOSED_DOOR)
|
||||
assert_eq(state.map.get_cell(Vector2i(39, 7)), GridMapState.CellKind.STAIRS)
|
||||
assert_eq(state.floor_state.floor_number, 0)
|
||||
assert_true(state.floor_state.chests.is_empty())
|
||||
for x in range(4, 36):
|
||||
assert_true(state.map.is_walkable(Vector2i(x, 7)), "Expected the surface corridor to include (%d, 7)." % x)
|
||||
|
||||
Reference in New Issue
Block a user