From badb712c58b2cdbcd71d40e6b4c86cae9cd0350e Mon Sep 17 00:00:00 2001 From: "K. S. Ernest (iFire) Lee" Date: Mon, 19 Feb 2024 04:19:46 -0800 Subject: [PATCH] Scramble the tasks. --- .gut_editor_config.json | 4 +- .../core_problems/test_construction.gd | 99 +++++++++---------- 2 files changed, 49 insertions(+), 54 deletions(-) diff --git a/.gut_editor_config.json b/.gut_editor_config.json index e88cc0e..43b1a15 100644 --- a/.gut_editor_config.json +++ b/.gut_editor_config.json @@ -34,12 +34,12 @@ "post_run_script": "", "pre_run_script": "", "prefix": "test_", - "selected": "test_game.gd", + "selected": "test_construction.gd", "should_exit": true, "should_exit_on_success": false, "should_maximize": false, "show_help": false, "suffix": ".gd", "tests": [], - "unit_test_name": "test_vr_community_planning" + "unit_test_name": "test_construction_planning" } \ No newline at end of file diff --git a/goal_task_tests/core_problems/test_construction.gd b/goal_task_tests/core_problems/test_construction.gd index 1081db6..f0614c2 100644 --- a/goal_task_tests/core_problems/test_construction.gd +++ b/goal_task_tests/core_problems/test_construction.gd @@ -15,68 +15,63 @@ var the_domain = preload("res://addons/task_goal/core/domain.gd").new(domain_nam var planner = preload("res://addons/task_goal/core/plan.gd").new() -# Types used for validation if necessary @export var types = { "activity": [ - "start", - "excavate_and_pour_footers", - "pour_concrete_foundation", - "erect_wooden_frame_including_rough_roof", - "lay_brickwork", - "install_basement_drains_and_plumbing", - "pour_basement_floor", - "install_rough_plumbing", - "install_rough_wiring", - "install_heating_and_ventilating", - "fasten_plaster_board_and_plaster", - "lay_finish_flooring", - "install_kitchen_fixtures", - "install_finish_plumbing", - "finish_carpentry", - "finish_roofing_and_flashing", - "fasten_gutters_and_downspouts", - "lay_storm_drains_for_rain_water", - "sand_and_varnish_flooring", - "paint", - "finish_electrical_work", - "finish_grading", + "finish", "pour_walks_and_complete_landscaping", - "finish" + "finish_grading", + "finish_electrical_work", + "paint", + "sand_and_varnish_flooring", + "lay_storm_drains_for_rain_water", + "fasten_gutters_and_downspouts", + "finish_roofing_and_flashing", + "finish_carpentry", + "install_finish_plumbing", + "install_kitchen_fixtures", + "lay_finish_flooring", + "fasten_plaster_board_and_plaster", + "install_heating_and_ventilating", + "install_rough_wiring", + "install_rough_plumbing", + "pour_basement_floor", + "install_basement_drains_and_plumbing", + "lay_brickwork", + "erect_wooden_frame_including_rough_roof", + "pour_concrete_foundation", + "excavate_and_pour_footers", + "start" ] } -# Dependency graph for the activities @export var dependencies: Dictionary = { - "start": [], - "excavate_and_pour_footers": ["start"], - "pour_concrete_foundation": ["excavate_and_pour_footers"], - "erect_wooden_frame_including_rough_roof": ["pour_concrete_foundation"], - "lay_brickwork": ["erect_wooden_frame_including_rough_roof"], - "install_basement_drains_and_plumbing": ["pour_concrete_foundation"], - "pour_basement_floor": ["install_basement_drains_and_plumbing"], - "install_rough_plumbing": ["install_basement_drains_and_plumbing"], - "install_rough_wiring": ["erect_wooden_frame_including_rough_roof"], - "install_heating_and_ventilating": ["erect_wooden_frame_including_rough_roof", "pour_basement_floor"], - "fasten_plaster_board_and_plaster": ["install_rough_wiring", "install_heating_and_ventilating", "install_rough_plumbing"], - "lay_finish_flooring": ["fasten_plaster_board_and_plaster"], - "install_kitchen_fixtures": ["lay_finish_flooring"], - "install_finish_plumbing": ["lay_finish_flooring"], - "finish_carpentry": ["lay_finish_flooring"], - "finish_roofing_and_flashing": ["lay_brickwork"], - "fasten_gutters_and_downspouts": ["finish_roofing_and_flashing"], - "lay_storm_drains_for_rain_water": ["pour_concrete_foundation"], - "sand_and_varnish_flooring": ["finish_carpentry", "install_basement_drains_and_plumbing"], - "paint": ["install_kitchen_fixtures", "install_finish_plumbing"], - "finish_electrical_work": ["start"], - "finish_grading": ["fasten_gutters_and_downspouts", "lay_storm_drains_for_rain_water"], + "finish": ["sand_and_varnish_flooring", "finish_electrical_work", "pour_walks_and_complete_landscaping"], "pour_walks_and_complete_landscaping": ["finish_grading"], - "finish": [ - "sand_and_varnish_flooring", - "finish_electrical_work", - "pour_walks_and_complete_landscaping" - ] + "finish_grading": ["fasten_gutters_and_downspouts", "lay_storm_drains_for_rain_water"], + "finish_electrical_work": ["start"], + "paint": ["install_kitchen_fixtures", "install_finish_plumbing"], + "sand_and_varnish_flooring": ["finish_carpentry", "install_basement_drains_and_plumbing"], + "lay_storm_drains_for_rain_water": ["pour_concrete_foundation"], + "fasten_gutters_and_downspouts": ["finish_roofing_and_flashing"], + "finish_roofing_and_flashing": ["lay_brickwork"], + "finish_carpentry": ["lay_finish_flooring"], + "install_finish_plumbing": ["lay_finish_flooring"], + "install_kitchen_fixtures": ["lay_finish_flooring"], + "lay_finish_flooring": ["fasten_plaster_board_and_plaster"], + "fasten_plaster_board_and_plaster": ["install_rough_wiring", "install_heating_and_ventilating", "install_rough_plumbing"], + "install_heating_and_ventilating": ["erect_wooden_frame_including_rough_roof", "pour_basement_floor"], + "install_rough_wiring": ["erect_wooden_frame_including_rough_roof"], + "install_rough_plumbing": ["install_basement_drains_and_plumbing"], + "pour_basement_floor": ["install_basement_drains_and_plumbing"], + "install_basement_drains_and_plumbing": ["pour_concrete_foundation"], + "lay_brickwork": ["erect_wooden_frame_including_rough_roof"], + "erect_wooden_frame_including_rough_roof": ["pour_concrete_foundation"], + "pour_concrete_foundation": ["excavate_and_pour_footers"], + "excavate_and_pour_footers": ["start"], + "start": [] } + # Prototypical initial state, can include current progress, resources etc. var state0: Dictionary = { # Example state properties