McRogueFace/tests/unit
John McCardle a4b1ab7d68 Grid layers: add HeightMap-based procedural generation methods
TileLayer (closes #200):
- apply_threshold(source, range, tile): Set tile index where heightmap value is in range
- apply_ranges(source, ranges): Apply multiple tile assignments in one pass

ColorLayer (closes #201):
- apply_threshold(source, range, color): Set fixed color where value is in range
- apply_gradient(source, range, color_low, color_high): Interpolate colors based on value
- apply_ranges(source, ranges): Apply multiple color assignments (fixed or gradient)

All methods return self for chaining. HeightMap size must match layer dimensions.
Later ranges override earlier ones if overlapping. Cells not matching any range are unchanged.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 22:35:44 -05:00
..
animate_method_test.py .animate helper: create and start an animation directly on a target. Preferred use pattern; closes #175 2026-01-04 15:32:14 -05:00
api_createScene_test.py update tests: new scene API 2026-01-03 10:59:52 -05:00
api_setScene_currentScene_test.py update tests: new scene API 2026-01-03 10:59:52 -05:00
api_timer_test.py Timer refactor: stopwatch-like semantics, mcrfpy.timers collection closes #173 2026-01-03 22:09:18 -05:00
audio_and_keyboard_test.py feat: Add Sound/Music classes, keyboard state, version (#66, #160, #164) 2025-12-29 16:24:27 -05:00
automation_screenshot_test_simple.py update tests: new scene API 2026-01-03 10:59:52 -05:00
automation_vector_test.py Positions are always mcrfpy.Vector, Vector/tuple/iterables expected as inputs, and for position-only inputs we permit x,y args to prevent requiring double-parens 2026-01-05 10:16:16 -05:00
benchmark_logging_test.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
check_entity_attrs.py fix: Update test files to use current API patterns 2025-12-29 19:47:48 -05:00
collection_find_test.py update tests: new scene API 2026-01-03 10:59:52 -05:00
collection_list_methods_test.py update tests: new scene API 2026-01-03 10:59:52 -05:00
debug_empty_paths.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
debug_render_test.py update tests: new scene API 2026-01-03 10:59:52 -05:00
empty_script.py Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
exit_immediately_test.py Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
generate_docs_screenshots.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
generate_grid_screenshot.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
generate_sprite_screenshot.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
keypress_scene_validation_test.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
scene_subclass_on_key_test.py Implement Scene subclass on_key callback support 2026-01-09 15:51:20 -05:00
screenshot_transparency_fix_test.py update tests: new scene API 2026-01-03 10:59:52 -05:00
simple_screenshot_test.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
simple_timer_screenshot_test.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_animation_callback_simple.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_animation_chaining.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_animation_debug.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_animation_immediate.py update tests: new scene API 2026-01-03 10:59:52 -05:00
test_animation_property_locking.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_animation_raii.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_animation_removal.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_api_docs.py refactor: comprehensive test suite overhaul and demo system 2025-11-25 23:37:05 -05:00
test_astar.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_audio_cleanup.py update tests: new scene API 2026-01-03 10:59:52 -05:00
test_bounds_hit_testing.py update tests: new scene API 2026-01-03 10:59:52 -05:00
test_builtin_context.py update tests: new scene API 2026-01-03 10:59:52 -05:00
test_color_fix.py update tests: new scene API 2026-01-03 10:59:52 -05:00
test_color_helpers.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_color_operations.py update tests: new scene API 2026-01-03 10:59:52 -05:00
test_color_setter_bug.py update tests: new scene API 2026-01-03 10:59:52 -05:00
test_colorlayer_heightmap.py Grid layers: add HeightMap-based procedural generation methods 2026-01-11 22:35:44 -05:00
test_constructor_comprehensive.py refactor: comprehensive test suite overhaul and demo system 2025-11-25 23:37:05 -05:00
test_dijkstra_pathfinding.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_documentation.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_drawable_move_resize_position_parsing.py Positions are always mcrfpy.Vector, Vector/tuple/iterables expected as inputs, and for position-only inputs we permit x,y args to prevent requiring double-parens 2026-01-05 10:16:16 -05:00
test_empty_animation_manager.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_entity_animation.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_entity_collection_remove.py update tests: new scene API 2026-01-03 10:59:52 -05:00
test_entity_constructor.py update tests: new scene API 2026-01-03 10:59:52 -05:00
test_entity_fix.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_entity_path_to.py update tests: new scene API 2026-01-03 10:59:52 -05:00
test_entity_path_to_edge_cases.py update tests: new scene API 2026-01-03 10:59:52 -05:00
test_entity_position_parsing.py Positions are always mcrfpy.Vector, Vector/tuple/iterables expected as inputs, and for position-only inputs we permit x,y args to prevent requiring double-parens 2026-01-05 10:16:16 -05:00
test_exact_failure.py update tests: new scene API 2026-01-03 10:59:52 -05:00
test_frame_clipping.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_frame_clipping_advanced.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_frame_kwargs.py refactor: comprehensive test suite overhaul and demo system 2025-11-25 23:37:05 -05:00
test_geometry.py feat: Add geometry module for orbital mechanics and spatial calculations 2025-11-26 00:26:14 -05:00
test_grid_apply.py Grid: add apply_threshold and apply_ranges for HeightMap (closes #199) 2026-01-11 20:42:47 -05:00
test_grid_background.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_grid_cell_events.py Timer refactor: stopwatch-like semantics, mcrfpy.timers collection closes #173 2026-01-03 22:09:18 -05:00
test_grid_children.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_grid_constructor_bug.py refactor: comprehensive test suite overhaul and demo system 2025-11-25 23:37:05 -05:00
test_grid_creation.py update tests: new scene API 2026-01-03 10:59:52 -05:00
test_grid_error.py update tests: new scene API 2026-01-03 10:59:52 -05:00
test_grid_iteration.py update tests: new scene API 2026-01-03 10:59:52 -05:00
test_grid_minimal.py refactor: comprehensive test suite overhaul and demo system 2025-11-25 23:37:05 -05:00
test_grid_pathfinding_positions.py Positions are always mcrfpy.Vector, Vector/tuple/iterables expected as inputs, and for position-only inputs we permit x,y args to prevent requiring double-parens 2026-01-05 10:16:16 -05:00
test_gridpoint_entities.py feat: Add GridPoint.entities and GridPointState.point properties 2025-12-01 21:04:03 -05:00
test_gridpointstate_point.py feat: Add GridPoint.entities and GridPointState.point properties 2025-12-01 21:04:03 -05:00
test_headless_benchmark.py update tests: new scene API 2026-01-03 10:59:52 -05:00
test_headless_click.py Timer refactor: stopwatch-like semantics, mcrfpy.timers collection closes #173 2026-01-03 22:09:18 -05:00
test_headless_detection.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_headless_modes.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_heightmap_basic.py HeightMap: add GRID_MAX limit and input validation 2026-01-11 20:26:04 -05:00
test_heightmap_query.py HeightMap: improve API consistency and add subscript support 2026-01-11 21:43:44 -05:00
test_heightmap_terrain.py HeightMap: improve dig_hill/dig_bezier API clarity 2026-01-11 22:21:58 -05:00
test_heightmap_threshold.py HeightMap: add threshold operations that return new HeightMaps (closes #197) 2026-01-11 21:49:28 -05:00
test_input_enums.py Input Enums instead of strings. 2026-01-10 21:31:20 -05:00
test_issue_151_scene_api.py feat: Add consistent Scene API with module-level properties (closes #151) 2025-12-22 22:15:03 -05:00
test_layer_position_parsing.py Positions are always mcrfpy.Vector, Vector/tuple/iterables expected as inputs, and for position-only inputs we permit x,y args to prevent requiring double-parens 2026-01-05 10:16:16 -05:00
test_metrics.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_mouse_enter_exit.py Timer refactor: stopwatch-like semantics, mcrfpy.timers collection closes #173 2026-01-03 22:09:18 -05:00
test_name_parameter.py refactor: comprehensive test suite overhaul and demo system 2025-11-25 23:37:05 -05:00
test_name_simple.py refactor: comprehensive test suite overhaul and demo system 2025-11-25 23:37:05 -05:00
test_new_constructors.py refactor: comprehensive test suite overhaul and demo system 2025-11-25 23:37:05 -05:00
test_no_arg_constructors.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_on_move.py Timer refactor: stopwatch-like semantics, mcrfpy.timers collection closes #173 2026-01-03 22:09:18 -05:00
test_oneline_for.py update tests: new scene API 2026-01-03 10:59:52 -05:00
test_parent_child_system.py update tests: new scene API 2026-01-03 10:59:52 -05:00
test_path_colors.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_pathfinding_integration.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_perspective_binding.py feat: Add entity.visible_entities() and improve entity.updateVisibility() (closes #113) 2025-12-01 15:55:18 -05:00
test_position_helper.py Positions are always mcrfpy.Vector, Vector/tuple/iterables expected as inputs, and for position-only inputs we permit x,y args to prevent requiring double-parens 2026-01-05 10:16:16 -05:00
test_profiler_quick.py update tests: new scene API 2026-01-03 10:59:52 -05:00
test_properties_quick.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_pyarg_bug.py refactor: comprehensive test suite overhaul and demo system 2025-11-25 23:37:05 -05:00
test_python_builtins.py refactor: comprehensive test suite overhaul and demo system 2025-11-25 23:37:05 -05:00
test_python_object_cache.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_range_25_bug.py update tests: new scene API 2026-01-03 10:59:52 -05:00
test_range_threshold.py update tests: new scene API 2026-01-03 10:59:52 -05:00
test_scene_object_api.py Monkey Patch support + Robust callback tracking 2026-01-09 21:37:23 -05:00
test_scene_properties.py update tests: new scene API 2026-01-03 10:59:52 -05:00
test_scene_transitions.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_scene_transitions_headless.py update tests: new scene API 2026-01-03 10:59:52 -05:00
test_simple_callback.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_simple_drawable.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_stdin_theory.py update tests: new scene API 2026-01-03 10:59:52 -05:00
test_step_function.py Timer refactor: stopwatch-like semantics, mcrfpy.timers collection closes #173 2026-01-03 22:09:18 -05:00
test_stubs.py refactor: comprehensive test suite overhaul and demo system 2025-11-25 23:37:05 -05:00
test_synchronous_screenshot.py update tests: new scene API 2026-01-03 10:59:52 -05:00
test_tcod_complete.py update tests: new scene API 2026-01-03 10:59:52 -05:00
test_tcod_fov.py update tests: new scene API 2026-01-03 10:59:52 -05:00
test_tcod_fov_entities.py feat: Implement FOV enum and layer draw_fov for #114 and #113 2025-12-01 15:18:10 -05:00
test_tcod_minimal.py update tests: new scene API 2026-01-03 10:59:52 -05:00
test_tcod_pathfinding.py update tests: new scene API 2026-01-03 10:59:52 -05:00
test_text_input.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_texture_invalid_path.py refactor: comprehensive test suite overhaul and demo system 2025-11-25 23:37:05 -05:00
test_tilelayer_heightmap.py Grid layers: add HeightMap-based procedural generation methods 2026-01-11 22:35:44 -05:00
test_timer_callback.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_timer_legacy.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_timer_object.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_timer_once.py Timer refactor: stopwatch-like semantics, mcrfpy.timers collection closes #173 2026-01-03 22:09:18 -05:00
test_uiarc.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_uicaption_visual.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_uicircle.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_uidrawable_monkeypatch.py Monkey Patch support + Robust callback tracking 2026-01-09 21:37:23 -05:00
test_uidrawable_subclass_callbacks.py Monkey Patch support + Robust callback tracking 2026-01-09 21:37:23 -05:00
test_utf8_encoding.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_vector_arithmetic.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_vector_convenience.py feat: Add Vector convenience features - indexing, tuple comparison, floor 2025-11-26 09:37:14 -05:00
test_viewport_scaling.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_visibility.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
test_visual_path.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
ui_Entity_issue73_test.py update tests: new scene API 2026-01-03 10:59:52 -05:00
ui_Frame_test_detailed.py update tests: new scene API 2026-01-03 10:59:52 -05:00
ui_Grid_none_texture_test.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
ui_Grid_null_texture_test.py update tests: new scene API 2026-01-03 10:59:52 -05:00
ui_Grid_test_no_grid.py update tests: new scene API 2026-01-03 10:59:52 -05:00
ui_Sprite_issue19_test.py update tests: new scene API 2026-01-03 10:59:52 -05:00
ui_UICollection_issue69_test.py update tests: new scene API 2026-01-03 10:59:52 -05:00
validate_screenshot_test.py update tests: new scene API 2026-01-03 10:59:52 -05:00
WORKING_automation_test_example.py Timer overhaul: update tests 2026-01-03 22:44:53 -05:00
working_timer_test.py Timer refactor: stopwatch-like semantics, mcrfpy.timers collection closes #173 2026-01-03 22:09:18 -05:00