From f2a930efd22b1032f893619e4eb8161851f77825 Mon Sep 17 00:00:00 2001 From: Zach Smith Date: Sat, 4 Dec 2021 13:39:45 -0700 Subject: [PATCH 01/16] Updated default season in module.yml --- module.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module.yml b/module.yml index 674496d1..2ab75f6a 100644 --- a/module.yml +++ b/module.yml @@ -10,8 +10,9 @@ config: - name: year display: Challenge type: values - default: 2020 RePLAY + default: 2021 CARGO CONNECT values: + - 2021 CARGO CONNECT - 2020 RePLAY - 2019 CITY SHAPER - 2018 INTO ORBIT From 9f4d608915437327c86b283df1352fbf7595dce7 Mon Sep 17 00:00:00 2001 From: Zach Smith Date: Sat, 4 Dec 2021 14:14:50 -0700 Subject: [PATCH 02/16] Added 2021 season file. --- challenges/js/2021_US.js | 765 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 765 insertions(+) create mode 100755 challenges/js/2021_US.js diff --git a/challenges/js/2021_US.js b/challenges/js/2021_US.js new file mode 100755 index 00000000..e60ef12f --- /dev/null +++ b/challenges/js/2021_US.js @@ -0,0 +1,765 @@ +({ + "title": "CARGO CONNECT", + "missions": [{ + "title": "M00 Equipment Inspection Bonus", + "description": "Designs using fewer parts can save you time and space, allowing for efficiency and sometimes fewer problems.", + "objectives": [{ + "id": "bonus", + "title": "All team equipment fits in the small inspection space:", + "type": "yesno", + "default": "no" + }], + "score": [function(bonus) { + bonus = String(bonus); + if (bonus === 'no') { + return 0 + } + if (bonus === 'yes') { + return 20 + } + }] + }, + { + "title": "M01 Innovation Project", + "description": "The innovation project is made of at least two white LEGO pieces and measures at least as long as 4 LEGO studs in at least one direction.", + "objectives": [{ + "id": "M01_1", + "title": "The innovation project is large enough (2+ white LEGO pieces and 4+ LEGO studs long) and is touching the CARGO CONNECT circle:", + "type": "yesno", + "default": "no" + }, + ], + "score": [function(M01_1) { + M01_1 = String(M01_1); + if (M01_1 === 'no') { + return 0 + } + if (M01_1 === 'yes') { + return 20 + } + }] + }, + { + "title": "M02 Unused Capacity", + "description": "Shipping efficiency increases by filling the empty container with cargo before transporting it.", + "objectives": [ + { + "id": "M02_1", + "title": "Is the hinged container completely closed?", + "type": "yesno", + "default": "no" + }, + { + "id": "M02_2", + "title": "How many pieces does it contain?", + "options": [ + { + "value": "0", + "title": "0" + }, + { + "value": "1", + "title": "1" + }, + { + "value": "2", + "title": "2" + }, + { + "value": "3", + "title": "3" + }, + { + "value": "4", + "title": "4" + }, + { + "value": "5", + "title": "5" + }, + { + "value": "6", + "title": "6" + } + ], + "type": "enum", + "default": "0" + } + ], + "score": [function(M02_1, M02_2) { + M02_1 = String(M02_1); + M02_2 = String(M02_2); + if (M02_1 === 'no') { + return 0; + } + switch (M02_2) { + case '0': + return 0; + case '1': + case '2': + case '3': + case '4': + case '5': + return 20; + case '6': + return 30; + } + }] + }, + { + "title": "M03 Unload Cargo Plane", + "description": "Unloading cargo is an important part of the journey. Planes are often just one of multiple forms of transportation used to deliver cargo containers to their destination.", + "objectives": [{ + "id": "M03_1", + "title": "Is the plane's cargo door completely down, touching its black frame?:", + "type": "yesno", + "default": "no" + }, + { + "id": "M03_2", + "title": "Has the cargo plane been unloaded so that the container is completely seperate from the plane?", + "type": "yesno", + "default": "no" + } + ], + "score": [function(M03_1, M03_2) { + M03_1 = String(M03_1); + M03_2 = String(M03_2); + if(M03_1 === 'no' && M03_2 === 'no') { + return 0; + } + if(M03_1 === 'no' && M03_2 === 'yes') { + return 10; + } + if(M03_1 === 'yes' && M03_2 === 'no') { + return 20; + } + if(M03_1 === 'yes' && M03_2 === 'yes') { + return 30; + } + }] + }, + { + "title": "M04 Transportation Journey", + "description": "Transporting cargo is a journey from beginning to end. Cargo often needs more than one form of transportation to complete the journey and reach a final destination.", + "objectives": [{ + "id": "M04_1", + "title": "Has the truck reached its destination, completely past its blue end line?", + "type": "yesno", + "default": "no" + }, + { + "id": "M04_2", + "title": "Has the airplane reached its destination, completely past its blue end line?", + "type": "yesno", + "default": "no" + } + ], + "score": [function(M04_1, M04_2) { + M04_1 = String(M04_1); + M04_2 = String(M04_2); + if (M04_1 === 'no' && M04_2 === 'no') { + return 0 + } + if (M04_1 === 'no' && M04_2 === 'yes') { + return 10 + } + if (M04_1 === 'yes' && M04_2 === 'no') { + return 10 + } + if (M04_1 === 'yes' && M04_2 === 'yes') { + return 30 + } + }] + }, +{ + "title": "M05 Switch Engine", + "description": "Energy efficiency plays an important role in transportation. Switch your engine from diesel to electric. You will save money while being environmentally friendly.", + "objectives": [{ + "id": "M05_1", + "title": "Has the engine been switched from diesel to electric so that the yellow bar rests all the way down/south?", + "type": "yesno", + "default": "no", + }, + ], + "score": [function(M05_1) { + M05_1 = String(M05_1); + if(M05_1 === 'no') { + return 0; + } + if(M05_1 === 'yes') { + return 20; + } + }] + }, +{ + "title": "M06 Accident Avoidance", + "description": "Accidents can cause many problems when transporting cargo. People could be hurt, cargo and machines could be damanged, or your cargo could be late.", + "objectives": [{ + "id": "M06_1", + "title": "Is the robot parked over the blue accident-avoidance line?", + "type": "yesno", + "default": "no" + }, + { + "id": "M06_2", + "title": "Is the yellow panel knocked down?", + "type": "yesno", + "default": "no", + }, + { + "id": "M06_3", + "title": "Is the black frame knocked down?", + "type": "yesno", + "default": "no", + } + ], + "score": [function(M06_1, M06_2, M06_3) { + M06_1 = String(M06_1); + M06_2 = String(M06_2); + M06_3 = String(M06_3); + if(M06_1 === 'no' || M06_3 === 'yes') { + return 0; + } + if(M06_1 === 'no' && M06_2 === 'no' && M06_3 === 'yes') { + return 20; + } + if(M06_1 === 'no' && M06_2 === 'no' && M06_3 === 'yes') { + return 30; + } + }] + }, +{ + "title": "M07 Unload Cargo Ship", + "description": "Unloading cargo is an important part of the journey. Ships are often just one of multiple forms of transportation used to deliver cargo containers to their destination.", + "objectives": [ + { + "id": "M07_1", + "title": "Is the container no longer touching the cargo ship's east deck?", + "type": "yesno", + "default": "no", + }, + { + "id": "M07_2", + "title": "Is the container completely east of the cargo ship's east deck?", + "type": "yesno", + "default": "no", + }, + ], + "score": [function(M07_1, M07_2) { + M07_1 = String(M07_1); + M07_2 = String(M07_2); + if (M07_1 === 'no') { + return 0; + } + if (M07_1 === 'yes' && M07_2 === 'no') { + return 20; + } + if (M07_1 === 'yes' && M07_2 === 'yes') { + return 30; + } + }] + }, + { + "title": "M08 Air Drop", + "description": "Helicopters can be used to transport cargo to areas that are difficult to reach. They are used to help others, bringing important packages like food.", + "objectives": [ + { + "id": "M08_1", + "title": "Is the food package seperated from your helicopter?", + "type": "yesno", + "default": "no", + }, + { + "id": "M08_2", + "title": "Is the food package seperated from the other field's helicopter and completely in your field's CARGO CONNECT circle?", + "type": "yesno", + "default": "no", + }, + { + "id": "M08_3", + "title": "Have both teams seperated their food packages from their field's helicopters?", + "type": "yesno", + "default": "no", + }, + ], + "score": [function(M08_1, M08_2, M08_3) { + M08_1 = String(M08_1); + M08_2 = String(M08_2); + M08_3 = String(M08_3); + if(M08_1 === 'no' && M08_2 === 'no' && M08_3 === 'no') { + return 0; + } + if(M08_1 === 'no' && M08_2 === 'no' && M08_3 === 'yes') { + return 10; + } + if(M08_1 === 'no' && M08_2 === 'yes' && M08_3 === 'no') { + return 10; + } + if(M08_1 === 'no' && M08_2 === 'yes' && M08_3 === 'yes') { + return 20; + } + if(M08_1 === 'yes' && M08_2 === 'no' && M08_3 === 'no') { + return 20; + } + if(M08_1 === 'yes' && M08_2 === 'no' && M08_3 === 'yes') { + return 30; + } + if(M08_1 === 'yes' && M08_2 === 'yes' && M08_3 === 'no') { + return 30; + } + if(M08_1 === 'yes' && M08_2 === 'yes' && M08_3 === 'yes') { + return 40; + } + }] + }, +{ + "title": "M09 Train Tracks", + "description": "Trains can transport cargo to many places. Keeping infrastructure like train tracks in good condition is important to ensure trains get to their destinations.", + "objectives": [ + { + "id": "M09_1", + "title": "Is the train track repaired, so that it rests completely down/West?", + "type": "yesno", + "default": "no", + }, + { + "id": "M09_2", + "title": "Has the train reached its destination, latched at the end of the tracks?", + "type": "yesno", + "default": "no", + }, + ], + "score": [function(M09_1, M09_2) { + M09_1 = String(M09_1); + M09_2 = String(M09_2); + if(M09_1 === 'no' && M09_2 === 'no') { + return 0; + } + if(M09_1 === 'no' && M09_2 === 'yes') { + return 0; + } + if(M09_1 === 'yes' && M09_2 === 'no') { + return 20; + } + if(M09_1 === 'yes' && M09_2 === 'yes') { + return 40; + } + }] + }, + { + "title": "M10 Sorting Center", + "description": "Transportation includes getting the correct cargo to the correct place. Sort your containers and deliver them to their destinations.", + "objectives": [{ + "id": "M10", + "title": "Is the light orange container the only container remaining completely in the blue sorting area?", + "type": "yesno", + "default": "no" + }], + "score": [function(M10) { + M10 = String(M10); + if (M10 === 'no') { + return 0 + } + if (M10 === 'yes') { + return 20 + } + }] + }, + { + "title": "M11 Home Delivery", + "description": "Having a package delivered to your doorstep is awesome! Packages can be transported safely, on time, and to your door.", + "objectives": [{ + "id": "M11_1", + "title": "Has the package been delivered to its destination on the doorstep (without touching equipment)?", + "options": [{ + "value": "none", + "title": "None" + }, + { + "value": "partly", + "title": "Partly" + }, + { + "value": "completely", + "title": "Completely" + }, + ], + "type": "enum", + "default": "none" + }], + "score": [function(M11_1) { + M11_1 = String(M11_1); + if (M11_1 === 'none') { + return 0 + } + if (M11_1 === 'partly') { + return 20 + } + if (M11_1 === 'completely') { + return 30 + } + }] + }, +{ + "title": "M12 Large Delivery", + "description": "Transporting large items can lead to unexpected problems, like maneuvering around a chicken statue along the way. It is important to plan ahead so nothing is damaged and your cargo arrives safely.", + "objectives": [ + { + "id": "M12_1", + "title": "What is the turbine blade touching?", + "options": [{ + "value": "none", + "title": "None" + }, + { + "value": "holder", + "title": "Holder" + }, + { + "value": "Holder_mat", + "title": "Holder & Mat" + }, + ], + "type": "enum", + "default": "none" + }, + { + "id": "M12_2", + "title": "Is the chicken statue is upright with its base in the circle?", + "options": [{ + "value": "none", + "title": "None" + }, + { + "value": "partly", + "title": "Partly" + }, + { + "value": "completely", + "title": "Completely" + }, + ], + "type": "enum", + "default": "none" + }, + ], + "score": [function(M12_1, M12_2) { + M12_1 = String(M12_1); + M12_2 = String(M12_2); + if (M12_1 === 'none' && M12_2 === 'none') { + return 0 + } + if (M12_1 === 'none' && M12_2 === 'partly') { + return 5 + } + if (M12_1 === 'none' && M12_2 === 'completely') { + return 10 + } + if (M12_1 === 'holder' && M12_2 === 'none') { + return 30 + } + if (M12_1 === 'holder' && M12_2 === 'partly') { + return 35 + } + if (M12_1 === 'holder' && M12_2 === 'completely') { + return 40 + } + if (M12_1 === 'Holder_mat' && M12_2 === 'none') { + return 20 + } + if (M12_1 === 'Holder_mat' && M12_2 === 'partly') { + return 25 + } + if (M12_1 === 'Holder_mat' && M12_2 === 'completely') { + return 30 + } + }] + }, + { + "title": "M13 Platooning Trucks", + "description": "Truck platooning is the linking of two or more trucks in transport. This allows trucks to move efficiently, saving time, fuel, and money.", + "objectives": [ + { + "id": "M13_1", + "title": "Are both trucks latched together completely outside of home?", + "type": "yesno", + "default": "no", + }, + { + "id": "M13_2", + "title": "Is a truck latched to the bridge?", + "type": "yesno", + "default": "no", + }, + ], + "score": [function(M13_1, M13_2) { + M13_1 = String(M13_1); + M13_2 = String(M13_2); + if (M13_1 === 'no' && M13_2 === 'no') { + return 0; + } + if (M13_1 === 'no' && M13_2 === 'yes') { + return 10; + } + if (M13_1 === 'yes' && M13_2 === 'no') { + return 10; + } + if (M13_1 === 'yes' && M13_2 === 'yes') { + return 30; + } + }] + }, + { + "title": "M14 Bridge", + "description": "The bridge can be raised and lowered to allow transport on both the river and road. Lower the bridge decks to prepare for the trucks to pass.", + "objectives": [{ + "id": "M14_1", + "title": "Number of bridge sections lowered and resting on the center support", + "options": [ + { + "value": "0", + "title": "0" + }, + { + "value": "1", + "title": "1" + }, + { + "value": "2", + "title": "2" + } + ], + "type": "enum", + "default": "0" + }, + ], + "score": [function(M14_1) { + M14_1 = Number(M14_1); + return M14_1 * 10; + }] + }, + { + "title": "M15 Load Cargo", + "description": "Load cargo containers safely and efficiently", + "objectives": [{ + "id": "M15_1", + "title": "Platooning Trucks", + "options": [ + { + "value": "0", + "title": "0" + }, + { + "value": "1", + "title": "1" + }, + { + "value": "2", + "title": "2 or more" + } + ], + "type": "enum", + "default": "0" + }, + { + "id": "M15_2", + "title": "Train", + "options": [ + { + "value": "0", + "title": "0" + }, + { + "value": "1", + "title": "1" + }, + { + "value": "2", + "title": "2 or more" + } + ], + "type": "enum", + "default": "0" + }, + { + "id": "M15_3", + "title": "Cargo Ship's West Deck", + "options": [ + { + "value": "0", + "title": "0" + }, + { + "value": "1", + "title": "1" + }, + { + "value": "2", + "title": "2 or more" + } + ], + "type": "enum", + "default": "0" + } + ], + "score": [function(M15_1, M15_2, M15_3) { + M15_1 = Number(M15_1); + M15_2 = Number(M15_2); + M15_3 = Number(M15_3); + return M15_1 * 10 + M15_2 * 20 + M15_3 * 30; + }] + }, + { + "title": "M16 CARGO CONNECT", + "description": "Connect cargo to all forms of transportation. Make as many connections as you can and transport your cargo by land, sea, or air to its destination!", + "objectives": [ + { + "id": "M16_1", + "title": "Number of containers PARTLY in a circle?", + "type": "number", + "default": 0, + "min": 0, + "max": 8, + "value": null + }, + { + "id": "M16_2", + "title": "Number of containers COMPLETELY in a circle?", + "type": "number", + "default": 0, + "min": 0, + "max": 8, + "value": null + }, + { + "id": "M16_3", + "title": "Number of circles with at least one container COMPLETELY in them?", + "type": "number", + "default": 0, + "min": 0, + "max": 6, + "value": null + }, + { + "id": "M16_4", + "title": "Is the blue (not hinged) container completely in the blue circle?", + "type": "yesno", + "default": "no", + }, + { + "id": "M16_5", + "title": "Is the lime green container completely in the lime green circle?", + "type": "yesno", + "default": "no", + } + ], + "score": [function(M16_1, M16_2, M16_3, M16_4, M16_5) { + M16_1 = Number(M16_1); + M16_2 = Number(M16_2); + M16_3 = Number(M16_3); + M16_4 = String(M16_4); + M16_5 = String(M16_5); + + return (M16_4 === 'yes' ? 20 : 0) + (M16_5 === 'yes' ? 20 : 0) + M16_1 * 5 + M16_2 * 10 + M16_3 * 10; + }] + }, + { + "title": "M17 Precision", + "description": "The less often you interrupt the robot outside home, the more points you keep.", + "objectives": [{ + "id": "precision", + "title": "Number of precision tokens left on the field:", + "options": [{ + "value": "0", + "title": "0" + }, + { + "value": "1", + "title": "1" + }, + { + "value": "2", + "title": "2" + }, + { + "value": "3", + "title": "3" + }, + { + "value": "4", + "title": "4" + }, + { + "value": "5", + "title": "5" + }, + { + "value": "6", + "title": "6" + } + ], + "type": "enum", + "default": "6" + }], + "score": [function(precision) { + precision = String(precision); + if (precision === '0') { + return 0 + } + if (precision === '1') { + return 10 + } + if (precision === '2') { + return 15 + } + if (precision === '3') { + return 25 + } + if (precision === '4') { + return 35 + } + if (precision === '5') { + return 50 + } + if (precision === '6') { + return 50 + } + }] + }, + { + "title": "Gracious Professionalism", + "description": "This category is not counted towards the overall score.", + "objectives": [{ + "id": "GP", + "title": "Gracious Professionalism displayed at the robot game table:", + "options": [ + { + "value": "2", + "title": "Developing 2" + }, + { + "value": "3", + "title": "Accomplished 3" + }, + { + "value": "4", + "title": "Exceeds 4" + } + ], + "type": "enum", + "default": "0" + }, + ], + "score": [function(GP) { + return 0; + }] + }, + ], + "strings": { + "yes": "Yes", + "no": "No", + "None": "None" + }, + "rtl": false +}) \ No newline at end of file From fd412d086f7d39a3c849d3a97980f39a32782704 Mon Sep 17 00:00:00 2001 From: Zach Smith Date: Sun, 5 Dec 2021 19:06:14 -0700 Subject: [PATCH 03/16] Fixed M06 logic, credit to timan24 --- challenges/js/2021_US.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/challenges/js/2021_US.js b/challenges/js/2021_US.js index e60ef12f..55fe6a5d 100755 --- a/challenges/js/2021_US.js +++ b/challenges/js/2021_US.js @@ -221,10 +221,10 @@ if(M06_1 === 'no' || M06_3 === 'yes') { return 0; } - if(M06_1 === 'no' && M06_2 === 'no' && M06_3 === 'yes') { + if(M06_1 === 'yes' && M06_2 === 'no' && M06_3 === 'no') { return 20; } - if(M06_1 === 'no' && M06_2 === 'no' && M06_3 === 'yes') { + if(M06_1 === 'yes' && M06_2 === 'yes' && M06_3 === 'no') { return 30; } }] From 845862854c2131ba2b1240420166e694a04a1031 Mon Sep 17 00:00:00 2001 From: Korbin Gugisberg <63560639+Galaxy-jpg@users.noreply.github.com> Date: Fri, 10 Nov 2023 19:40:09 -0700 Subject: [PATCH 04/16] Added 2023_US.js --- challenges/js/2023_US.js | 723 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 723 insertions(+) create mode 100644 challenges/js/2023_US.js diff --git a/challenges/js/2023_US.js b/challenges/js/2023_US.js new file mode 100644 index 00000000..50f26ebe --- /dev/null +++ b/challenges/js/2023_US.js @@ -0,0 +1,723 @@ +({ + "title": "MASTER PIECE", + "missions": [{ + "title": "EIB EQUIPMENT INSPECTION BONUS", + "description": "Designs using fewer parts can save you time and space, allowing for efficiency and sometimes fewer problems.", + "objectives": [{ + "id": "bonus", + "title": "All team equipment fits in one launch area and under 12in.", + "type": "yesno", + "default": "no" + }], + "score": [function(bonus) { + bonus = String(bonus); + if (bonus === 'no') { + return 0 + } + if (bonus === 'yes') { + return 20 + } + }] + }, + { + "title": "M01 3D CINEMA", + "description": "N/A", + "objectives": [{ + "id": "M01_1", + "title": "The 3D cinema's red beam is completely to the right of the black frame", + "type": "yesno", + "default": "no" + }, + ], + "score": [function(M01_1) { + M01_1 = String(M01_1); + if (M01_1 === 'no') { + return 0 + } + if (M01_1 === 'yes') { + return 20 + } + }] + }, + { + "title": "M02 THEATER SCENE CHANGE", + "description": "N/A", + "objectives": [ + { + "id": "M02_1", + "title": "Your theater's red flag is down and the active scene color is", + "options": [ + { + "value": "0", + "title": "No" + }, + { + "value": "1", + "title": "Blue" + }, + { + "value": "2", + "title": "Pink" + }, + { + "value": "3", + "title": "Orange" + } + ], + "type": "enum", + "default": "0" + }, + { + "id": "M02_2", + "title": "Both teams' active scenes match", + "type": "yesno", + "default": "no" + } + ], + "score": [function(M02_2, M02_1) { + M02_1 = String(M02_1); + M02_2 = String(M02_2); + if (M02_2 === 'no') { + switch (M02_1) { + case '0': + return 0; + case '1': + return 10; + case '2': + return 20; + case '3': + return 30; + } + } + if (M02_2 === 'yes') { + switch(M02_1) { + case '0': + return 0; + case '1': + return 30; + case '2': + return 50; + case '3': + return 40; + } + } + }] + }, + { + "title": "M03 IMMERSIVE EXPERIENCE", + "description": "N/A", + "objectives": [{ + "id": "M03", + "title": "The three immersive experience screens are raised", + "type": "yesno", + "default": "no" + }], + "score": [function(M03_1) { + M03_1 = String(M03_1); + if (M03_1 === 'no') { + return 0; + } + if (M03_1 === 'yes') { + return 20; + } + }] + }, + { + "title": "M04 MASTERPIECE", + "description": "N/A", + "objectives": [{ + "id": "M04_1", + "title": "Your team's LEGO art piece is at least partly in the museum target area", + "type": "yesno", + "default": "no" + }, + { + "id": "M04_2", + "title": "The art piece is completely supported by the pedestal", + "type": "yesno", + "default": "no" + } + ], + "score": [function(M04_1, M04_2) { + M04_1 = String(M04_1); + M04_2 = String(M04_2); + if (M04_1 === 'no') { + return 0; + } + if (M04_1 === 'yes') { + if (M04_2 === 'no') { + return 10; + } + if (M04_2 === 'yes') { + return 30; + } + } + }] + }, +{ + "title": "M05 Switch Engine", + "description": "N/A", + "objectives": [{ + "id": "M05_1", + "title": "The augmented reality statue's orange lever is totated completely to the right", + "type": "yesno", + "default": "no", + }, + ], + "score": [function(M05_1) { + M05_1 = String(M05_1); + if(M05_1 === 'no') { + return 0; + } + if(M05_1 === 'yes') { + return 30; + } + }] + }, +{ + "title": "M06 MUSIC CONCERT LIGHTS AND SOUNDS", + "description": "N/A", + "objectives": [{ + "id": "M06_1", + "title": "The lights' orange lever is rotated completely downwards", + "type": "yesno", + "default": "no" + }, + { + "id": "M06_2", + "title": "The speakers' orange lever is rotated completely to the left", + "type": "yesno", + "default": "no", + } + ], + "score": [function(M06_1, M06_2) { + M06_1 = String(M06_1); + M06_2 = String(M06_2); + if (M06_1 === 'no' && M06_2 === 'no') { + return 0; + } + if (M06_1 === 'yes' && M06_2 === 'no' || M06_1 === 'no' && M06_2 === 'yes' ) { + return 10; + } + if (M06_1 == 'yes' && M06_2 === 'yes') { + return 20; + } + }] + }, +{ + "title": "M07 HOLOGRAM PERFORMER", + "description": "N/A", + "objectives": [ + { + "id": "M07_1", + "title": "The hologram performer's orange push activator is completely past the black stage set line", + "type": "yesno", + "default": "no", + } + ], + "score": [function(M07_1) { + M07_1 = String(M07_1); + if (M07_1 === 'no') { + return 0; + } + if (M07_1 === 'yes') { + return 20; + } + }] + }, + { + "title": "M08 ROLLING CAMERA", + "description": "N/A", + "objectives": [ + { + "id": "M08_1", + "title": "The rolling camera's white pointer is left of ", + "options": [ + { + "value": "0", + "title": "None" + }, + { + "value": "1", + "title": "Dark blue" + }, + { + "value": "2", + "title": "Dark & medium blue" + }, + { + "value": "3", + "title": "Dark, medium, & light blue" + } + ], + "type": "enum", + "default": "0", + } + ], + "score": [function(M08_1) { + M08_1 = String(M08_1); + switch(M08_1) { + case '0': + return 0; + case '1': + return 10; + case '2': + return 20; + case '3': + return 30; + } + }] + }, +{ + "title": "M09 MOVIE SET", + "description": "N/A", + "objectives": [ + { + "id": "M09_1", + "title": "The boat is touching the mat and is coompletely past the black scene", + "type": "yesno", + "default": "no", + }, + { + "id": "M09_2", + "title": "The camera is touching the mat and is at least partly in the camera target area", + "type": "yesno", + "default": "no", + }, + ], + "score": [function(M09_1, M09_2) { + M09_1 = String(M09_1); + M09_2 = String(M09_2); + if(M09_1 === 'no' && M09_2 === 'no') { + return 0; + } + if(M09_1 === 'no' && M09_2 === 'yes' || M09_1 === 'yes' && M09_2 === 'no') { + return 10; + } + if(M09_1 === 'yes' && M09_2 === 'yes') { + return 10; + } + }] + }, + { + "title": "M10 SOUND MIXER", + "description": "N/A", + "objectives": [{ + "id": "M10_1", + "title": "Number of sound mixer sliders that are raised", + "options": [ + { + "value": "0", + "title": "0" + }, + { + "value": "1", + "title": "1" + }, + { + "value": "2", + "title": "2" + }, + { + "value": "3", + "title": "3" + } + ], + "type": "enum", + "default": "0" + }], + "score": [function(M10_1) { + M10_1 = String(M10_1); + switch(M10_1) { + case 0: + return 0; + case 1: + return 10; + case 2: + return 20; + case 3: + return 30; + } + }] + }, + { + "title": "M11 LIGHT SHOW", + "description": "N/A", + "objectives": [{ + "id": "M11_1", + "title": "The light show's white pointer is within zone", + "options": [{ + "value": "0", + "title": "None" + }, + { + "value": "1", + "title": "Yellow" + }, + { + "value": "2", + "title": "Green" + }, + { + "value": "3", + "title": "Blue" + } + ], + "type": "enum", + "default": "0" + }], + "score": [function(M11_1) { + M11_1 = String(M11_1); + switch(M11_1) { + case 0: + return 0; + case 1: + return 10; + case 2: + return 20; + case 3: + return 30; + } + }] + }, +{ + "title": "M12 VIRTUAL REALITY ARIST", + "description": "N/A", + "objectives": [ + { + "id": "M12_1", + "title": "The chicken is intact", + "type": "yesno", + "default": "no" + }, + { + "id": "M12_2", + "title": "Is the chicken statue is upright with its base in the circle?", + "type": "yesno", + "default": "none" + }, + ], + "score": [function(M12_1, M12_2) { + M12_1 = String(M12_1); + M12_2 = String(M12_2); + if (M12_1 === 'no') { + return 0; + } + if (M12_1 === 'yes') { + if (M12_2 === 'no') { + return 10; + } + if (M12_2 === 'yes') { + return 30; + } + } + }] + }, + { + "title": "M13 CRAFT CREATOR", + "description": "N/A", + "objectives": [ + { + "id": "M13_1", + "title": "The craft machine's orange and white lid is completely open", + "type": "yesno", + "default": "no", + }, + { + "id": "M13_2", + "title": "The craft machine's light pink ", + "type": "yesno", + "default": "no", + }, + ], + "score": [function(M13_1, M13_2) { + M13_1 = String(M13_1); + M13_2 = String(M13_2); + if (M13_1 === 'no' && M13_2 === 'no') { + return 0; + } + if (M13_1 === 'no' && M13_2 === 'yes') { + return 20; + } + if (M13_1 === 'yes' && M13_2 === 'no') { + return 10; + } + if (M13_1 === 'yes' && M13_2 === 'yes') { + return 30; + } + }] + }, + { + "title": "M14 AUDIENCE DELIVERY", + "description": "N/A", + "objectives": [{ + "id": "M14_1", + "title": "Number of bridge sections lowered and resting on the center support", + "options": [ + { + "value": "0", + "title": "0" + }, + { + "value": "1", + "title": "1" + }, + { + "value": "2", + "title": "2" + }, + { + "value": "3", + "title": "3" + }, + { + "value": "4", + "title": "4" + }, + { + "value": "5", + "title": "5" + }, + { + "value": "6", + "title": "6" + }, + { + "value": "7", + "title": "7" + } + ], + "type": "enum", + "default": "0" + }, + { + "id": "M14_2", + "title": "", + "options": [ + { + "value": "0", + "title": "0" + }, + { + "value": "1", + "title": "1" + }, + { + "value": "2", + "title": "2" + }, + { + "value": "3", + "title": "3" + }, + { + "value": "4", + "title": "4" + }, + { + "value": "5", + "title": "5" + }, + { + "value": "6", + "title": "6" + }, + { + "value": "7", + "title": "7" + } + ], + "type": "enum", + "default": "0" + } + ], + "score": [function(M14_1, M14_2) { + M14_1 = String(M14_1); + M14_2 = String(M14_2); + // I don't know if this will work, so if there is a problem, check here + a = 0; + b = 0; + switch (M14_1) { + case 0: + a = 0; + case 1: + a = 5; + case 2: + a = 10; + case 3: + a = 15; + case 4: + a = 20; + case 5: + a = 25; + case 6: + a = 30; + case 7: + a = 35; + } + switch (M14_2) { + case 0: + b = 0; + case 1: + b = 5; + case 2: + b = 10; + case 3: + b = 15; + case 4: + b = 20; + case 5: + b = 25; + case 6: + b = 30; + case 7: + b = 35; + } + // This is another spot I don't know if it will work + return a+b ; + }] + }, + { + "title": "M15 EXPERT DELIVERY", + "description": "N/A", + "objectives": [{ + "id": "M15_1", + "title": "Platooning Trucks", + "options": [ + { + "value": "0", + "title": "0" + }, + { + "value": "1", + "title": "1" + }, + { + "value": "2", + "title": "2" + }, + { + "value": "3", + "title": "3" + }, + { + "value": "4", + "title": "4" + }, + { + "value": "5", + "title": "5" + }, + { + "value": "6", + "title": "6" + } + ], + "type": "enum", + "default": "0" + } + ], + "score": [function(M15_1) { + M15_1 = Number(M15_1); + return M15_1 * 10; + }] + }, + { + "title": "PT Precision", + "description": "The less often you interrupt the robot outside home, the more points you keep.", + "objectives": [{ + "id": "precision", + "title": "Number of precision tokens left on the field:", + "options": [{ + "value": "0", + "title": "0" + }, + { + "value": "1", + "title": "1" + }, + { + "value": "2", + "title": "2" + }, + { + "value": "3", + "title": "3" + }, + { + "value": "4", + "title": "4" + }, + { + "value": "5", + "title": "5" + }, + { + "value": "6", + "title": "6" + } + ], + "type": "enum", + "default": "6" + }], + "score": [function(precision) { + precision = String(precision); + if (precision === '0') { + return 0 + } + if (precision === '1') { + return 10 + } + if (precision === '2') { + return 15 + } + if (precision === '3') { + return 25 + } + if (precision === '4') { + return 35 + } + if (precision === '5') { + return 50 + } + if (precision === '6') { + return 50 + } + }] + }, + { + "title": "Gracious Professionalism", + "description": "This category is not counted towards the overall score.", + "objectives": [{ + "id": "GP", + "title": "Gracious Professionalism displayed at the robot game table:", + "options": [ + { + "value": "2", + "title": "Developing 2" + }, + { + "value": "3", + "title": "Accomplished 3" + }, + { + "value": "4", + "title": "Exceeds 4" + } + ], + "type": "enum", + "default": "0" + }, + ], + "score": [function(GP) { + return 0; + }] + }, + ], + "strings": { + "yes": "Yes", + "no": "No", + "None": "None" + }, + "rtl": false +}) \ No newline at end of file From fb64d7da2cdc96c1e06427a9ba887c35427b609e Mon Sep 17 00:00:00 2001 From: Korbin Gugisberg <63560639+Galaxy-jpg@users.noreply.github.com> Date: Fri, 10 Nov 2023 20:06:40 -0700 Subject: [PATCH 05/16] Updated module.yml for 2023 --- module.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module.yml b/module.yml index 2ab75f6a..5019db2f 100644 --- a/module.yml +++ b/module.yml @@ -10,8 +10,9 @@ config: - name: year display: Challenge type: values - default: 2021 CARGO CONNECT + default: 2023 MASTERPIECE values: + - 2023 MASTERPIECE - 2021 CARGO CONNECT - 2020 RePLAY - 2019 CITY SHAPER From 6aa8905d5aee684677a2a4cc4812049db32fa48c Mon Sep 17 00:00:00 2001 From: Korbin Gugisberg <63560639+Galaxy-jpg@users.noreply.github.com> Date: Sat, 11 Nov 2023 18:45:12 -0700 Subject: [PATCH 06/16] Fixed 2023_US.js --- challenges/js/2023_US.js | 70 +++++++++------------------------------- 1 file changed, 15 insertions(+), 55 deletions(-) diff --git a/challenges/js/2023_US.js b/challenges/js/2023_US.js index 50f26ebe..05bd7a61 100644 --- a/challenges/js/2023_US.js +++ b/challenges/js/2023_US.js @@ -107,7 +107,7 @@ "title": "M03 IMMERSIVE EXPERIENCE", "description": "N/A", "objectives": [{ - "id": "M03", + "id": "M03_1", "title": "The three immersive experience screens are raised", "type": "yesno", "default": "no" @@ -329,13 +329,13 @@ "score": [function(M10_1) { M10_1 = String(M10_1); switch(M10_1) { - case 0: + case '0': return 0; - case 1: + case '1': return 10; - case 2: + case '2': return 20; - case 3: + case '3': return 30; } }] @@ -369,13 +369,13 @@ "score": [function(M11_1) { M11_1 = String(M11_1); switch(M11_1) { - case 0: + case '0': return 0; - case 1: + case '1': return 10; - case 2: + case '2': return 20; - case 3: + case '3': return 30; } }] @@ -452,7 +452,7 @@ "description": "N/A", "objectives": [{ "id": "M14_1", - "title": "Number of bridge sections lowered and resting on the center support", + "title": "Number of audience members completely in a target destination", "options": [ { "value": "0", @@ -492,7 +492,7 @@ }, { "id": "M14_2", - "title": "", + "title": "Number of target destinations with at least one audience member completely in it", "options": [ { "value": "0", @@ -532,49 +532,9 @@ } ], "score": [function(M14_1, M14_2) { - M14_1 = String(M14_1); - M14_2 = String(M14_2); - // I don't know if this will work, so if there is a problem, check here - a = 0; - b = 0; - switch (M14_1) { - case 0: - a = 0; - case 1: - a = 5; - case 2: - a = 10; - case 3: - a = 15; - case 4: - a = 20; - case 5: - a = 25; - case 6: - a = 30; - case 7: - a = 35; - } - switch (M14_2) { - case 0: - b = 0; - case 1: - b = 5; - case 2: - b = 10; - case 3: - b = 15; - case 4: - b = 20; - case 5: - b = 25; - case 6: - b = 30; - case 7: - b = 35; - } - // This is another spot I don't know if it will work - return a+b ; + M14_1 = Number(M14_1); + M14_2 = Number(M14_2); + return (M14_1 + M14_2) * 5; }] }, { @@ -582,7 +542,7 @@ "description": "N/A", "objectives": [{ "id": "M15_1", - "title": "Platooning Trucks", + "title": "Number of experts at least partly in their target destinations", "options": [ { "value": "0", From 1c93ebcc88c18fb5c31db98b6f9ad8d9d582dbb4 Mon Sep 17 00:00:00 2001 From: Korbin Gugisberg <63560639+Galaxy-jpg@users.noreply.github.com> Date: Thu, 30 Nov 2023 15:01:01 -0700 Subject: [PATCH 07/16] Fixed Title Problem --- challenges/js/2023_US.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/js/2023_US.js b/challenges/js/2023_US.js index 05bd7a61..461694ee 100644 --- a/challenges/js/2023_US.js +++ b/challenges/js/2023_US.js @@ -1,5 +1,5 @@ ({ - "title": "MASTER PIECE", + "title": "MASTERPIECE", "missions": [{ "title": "EIB EQUIPMENT INSPECTION BONUS", "description": "Designs using fewer parts can save you time and space, allowing for efficiency and sometimes fewer problems.", From 32f32a47c30be63d4081ea076ee72a811afdd6dd Mon Sep 17 00:00:00 2001 From: Korbin Gugisberg Date: Thu, 15 Aug 2024 13:43:20 -0700 Subject: [PATCH 08/16] Added 2024, with missions 1-8 so far --- challenges/js/2024_US.js | 279 +++++++++++++++++++++++++++++++++++++++ module.yml | 3 +- 2 files changed, 281 insertions(+), 1 deletion(-) create mode 100644 challenges/js/2024_US.js diff --git a/challenges/js/2024_US.js b/challenges/js/2024_US.js new file mode 100644 index 00000000..3390c64a --- /dev/null +++ b/challenges/js/2024_US.js @@ -0,0 +1,279 @@ +({ + "title": "SUBMERGED", + "missions": [{ + "title": "EI EQUIPMENT INSPECTION", + "description": "N/A", + "objectives": [{ + "id": "EI", + "title": "The robot and all equipment fit completely in one launch area and under the height limit", + "type": "yesno" + "default": "no" + " + }], + "score": [function(EI) { + EI = String(EI); + if (EI === 'no') { + return 0; + } + if (EI === 'yes') { + return 20; + } + }] + }, + { + "title": "MO1 Coral Nursery", + "description": "N/A", + "objectives": [{ + "id": "M01_1", + "title": "The coral tree is hanging on the coral tree support.", + "type": "yesno", + "default": "no" + }, + { + "id": "M01_2", + "title": "The bottom of the coral tree is in its holder.", + "type": "yesno", + "default": "no" + }, + { + "id": "M01_3", + "title": "The coral buds are flipped up.", + "type": "yesno", + "default": "no" + } + ], + "score": [function(M01_1, M01_2, M01_3) { + M01_1 = String(M01_1); + M01_2 = String(M01_2); + M01_3 = String(M01_3); + if (M01_3 === 'yes') { + if (M01_1 === 'yes' && M01_2 === 'yes') { + return 50; + } + if (M01_1 === 'yes' && M01_2 === 'no') { + return 40; + } + if (M01_1 === 'no') { + return 20; + } + } + if (M01_3 === 'no') { + if (M01_1 === 'yes' && M01_2 === 'yes') { + return 30; + } + if (M01_1 === 'yes' && M01_2 === 'no') { + return 20; + } + if (M01_1 === 'no') { + return 0; + } + } + }] + }, + { + "title": "M02 SHARK", + "description": "N/A", + "objectives": [{ + "id": "M02_1", + "title": "The shark is no longer touching the cave", + "type": "yesno", + "default": "no" + }, + { + "id": "M02_2", + "title": "The shark is touching the mat at least partly in the shark habitat.", + "type": "yesno", + "default": "no" + }], + "score": [function(M02_1, M02_2) { + M02_1 = String(M02_1); + M02_2 = String(M02_2); + if (M02_1 === 'yes' && M02_2 === 'yes') { + return 30; + } + if (M02_1 === 'yes' && M02_2 === 'no') { + return 20; + } + if (M02_1 === 'no' && M02_2 === 'yes') { + return 10; + } + if (M02_1 === 'no' && M02_2 === 'no') { + return 0; + } + }] + }, + { + "title": "M03 CORAL REEF", + "description": "N/A", + "objectives": [{ + "id": "M03_1", + "title": "The coral reef is flipped up, not touching the mat.", + "type": "yesno", + "default": "no" + }, + { + "id": "M03_2", + "title": "Number of reef segments standing upright, outside of home, and touching the mat.", + "options": [ + { + "value": "0", + "title": "0" + }, + { + "value": "1", + "title": "1" + }, + { + "value": "2", + "title": "2", + }, + { + "value": "3", + "title": "3" + } + ], + "type": "enum", + "default": "0" + } + ], + "score": [function(M03_1, M03_2) { + M03_1 = String(M03_1); + M03_2 = Number(M03_2); + if (M03_1 === 'yes') { + return M03_2 * 5 + 20; + } + if (M03_2 === 'no') { + return M03_2 * 5; + } + }] + }, + { + "title": "M04 SCUBA DIVER", + "description": "N/A", + "objectives": [{ + "id": "M04_1", + "title": "The scuba diver is no longer touching the coral nursery.", + "type": "yesno", + "default": "no" + }, + { + "id": "M04_2", + "title": "The scuba diver is hanging on the coral reef support.". + "type": "yesno", + "default": "no" + }], + "score": [function(M04_1, M04_2) { + M04_1 = String(M04_1); + M04_2 = String(M04_2); + if (M04_1 === 'yes' && M04_2 === 'yes') { + return 40; + } + if (M04_1 === 'yes' && M04_2 === 'no' || M04_1 === 'no' && M04_2 === 'yes') { + return 20; + } + if (M04_1 === 'no' && M04_2 === 'no') { + return 0; + } + }] + }, + { + "title": "M05 ANGLER FISH", + "description": "N/A", + "objectives": [{ + "id": "M05_1", + "title": "The angler fish is latched within the shipwreck.", + "type": "yesno", + "default": "no" + }], + "score": [function(M05_1) { + M05_1 = String(M05_1); + if (M05_1 === 'yes') { + return 30; + } + if (M05_1 === 'no') { + return 0; + } + }] + }, + { + "title": "M06 RAISE THE MAST", + "description": "N/A", + "objectives": [{ + "id": "M06_1", + "title": "The shipwrech's mast is completely raised.", + "type": "yesno", + "default": "no" + }], + "score": [function(M06_1) { + M06_1 = String(M06_1); + if (M06_1 === 'yes') { + return 30; + } + if (M06_1 === 'no') { + return 0; + } + }] + }, + { + "title": "M07 KRAKEN'S TREASURE", + "description": "N/A", + "objectives": [{ + "id": "M07_1", + "title": "The treasure chest is completely outside the kraken's nest.", + "type": "yesno", + "default": "no" + }], + "score": [function(M07_1) { + M07_1 = String(M07_1); + if (M07_1 === 'yes') { + return 20; + } + if (M07_1 === 'no') { + return 0; + } + }] + }, + { + "title": "M08 ARTIFICIAL HABITAT", + "description": "N/A", + "objectives": [{ + "id": "M08_1", + "title": "Number of artificial habitat stack segments completely flat and upright.", + "options": [ + { + "value": "0", + "title": "0" + }, + { + "value": "1", + "title": "1" + }, + { + "value": "2", + "title": "2" + }, + { + "value": "3", + "title": "3" + }, + { + "value": "4", + "title": "4", + } + ], + "type": "enum", + "default": "0" + }], + "score": [function(M08_1) { + M08_1 = Number(M08_1); + return M08_1 * 10; + }] + } + }], + "strings": { + "yes": "Yes", + "no": "No", + "None": "None" + }, + "rtl": false +}) diff --git a/module.yml b/module.yml index 5019db2f..84ddc8a1 100644 --- a/module.yml +++ b/module.yml @@ -10,8 +10,9 @@ config: - name: year display: Challenge type: values - default: 2023 MASTERPIECE + default: 2024 SUBMERGED values: + - 2024 SUBMERGED - 2023 MASTERPIECE - 2021 CARGO CONNECT - 2020 RePLAY From aea598e1df09052a502d8e784c30073146e7a836 Mon Sep 17 00:00:00 2001 From: Korbin Gugisberg Date: Thu, 15 Aug 2024 14:18:23 -0700 Subject: [PATCH 09/16] Added Mission 9-12 --- challenges/js/2024_US.js | 147 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) diff --git a/challenges/js/2024_US.js b/challenges/js/2024_US.js index 3390c64a..3245cad0 100644 --- a/challenges/js/2024_US.js +++ b/challenges/js/2024_US.js @@ -268,6 +268,153 @@ M08_1 = Number(M08_1); return M08_1 * 10; }] + }, + { + "title": "M09 UNEXPECTED ENCOUNTER", + "description": "N/A", + "objectives": [{ + "id": "M09_1", + "title": "The unknown creature is released.", + "type": "yesno", + "default": "no" + }, + { + "id": "M09_2", + "title": "The unknown creature is at least partly in the cold seep.". + "type": "yesno", + "default": "no" + }], + "score": [function(M09_1, M09_2) { + M09_1 = String(M09_1); + M09_2 = String(M09_2); + if (M09_1 === 'yes') { + if (M09_2 === 'yes') { + return 30; + } + if (M09_2 === 'no') { + return 20; + } + } + if (M09_1 === 'no') { + if (M09_2 === 'yes') { + return 10; + } + if (M09_2 === 'no') { + return 0; + } + } + }] + }, + { + "title": "M10 SEND OVER THE SUBMERSIBLE", + "description": "N/A", + "objectives": [{ + "id": "M10_1", + "title": "Your team's yellow flag is down.", + "type": "yesno", + "default": "no" + }, + { + "id": "M10_2", + "title": "The submersible is clearly closer to the opposing field.", + "type": "yesno", + "default": "no" + }], + "score": [function(M10_1, M10_2) { + M10_1 = String(M10_1); + M10_2 = String(M10_2); + if (M10_1 === 'yes') { + if (M10_2 === 'yes') { + return 40; + } + if (M10_2 === 'no') { + return 30; + } + } + if (M10_1 === 'no') { + if (M10_2 === 'yes') { + return 10; + } + if (M10_2 === 'no') { + return 0; + } + } + }] + }, + { + "title": "M11 SONAR DISCOVERY", + "description": "N/A", + "objectives": [{ + "id": "M11_1", + "title": "Number of whales revealed.", + "options": [ + { + "value": "0", + "title": "0" + }, + { + "value": "1", + "title": "1" + }, + { + "value": "2", + "title": "2" + } + ], + "type": "enum", + "default": "0" + }], + "score": [function(M11_1) { + M11_1 = String(M11_1); + switch (M11_1) { + case "0": + return 0; + case "1": + return 20; + case "2": + return 30; + } + }] + }, + { + "title": "M12 FEED THE WHALE", + "description": "N/A", + "objectives": [{ + "id": "M12_1", + "title": "Number of krill at least partly in the whale's mouth.", + "options": [ + { + "value": "0", + "title": "0" + }, + { + "value": "1", + "title": "1" + }, + { + "value": "2", + "title": "2" + }, + { + "value": "3", + "title": "3" + }, + { + "value": "4", + "title": "4" + }, + { + "value": "5", + "title": "5", + } + ], + "type": "enum", + "default": "0" + }], + "score": [function(M12_1) { + M12_1 = Number(M12_1); + return M12_1 * 10; + }] } }], "strings": { From c141efd58090061c2b87be86b9a17eb73b1e6f6f Mon Sep 17 00:00:00 2001 From: Korbin Gugisberg Date: Fri, 16 Aug 2024 14:16:55 -0700 Subject: [PATCH 10/16] Added Missions 13-15 --- challenges/js/2024_US.js | 181 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 181 insertions(+) diff --git a/challenges/js/2024_US.js b/challenges/js/2024_US.js index 3245cad0..a1af16c1 100644 --- a/challenges/js/2024_US.js +++ b/challenges/js/2024_US.js @@ -415,6 +415,187 @@ M12_1 = Number(M12_1); return M12_1 * 10; }] + }, + { + "title": "M13 CHANGING SHIPPING LANES", + "description": "N/A", + "objectives": [{ + "id": "M13_1", + "title": "The ship is in the new shipping lane, touching the mat.", + "type": "yesno", + "default": "no" + }], + "score": [function(M12_1) { + M12_1 = String(M12_1); + if (M12_1 === 'yes') { + return 20; + } + if (M12_1 === 'no') { + return 0; + } + }] + }, + { + "title": "M14 SAMPLE VESSEL", + "description": "N/A", + "objectives": [{ + "id": "M14_1", + "title": "The water sample is completely outside the water sample area.", + "type": "yesno", + "default": "no" + }, + { + "id": "M14_2", + "title": "The seabed sample is no longer touching the seabed.", + "type": "yesno", + "default": "no" + }, + { + "id": "M14_3", + "title": "The plankton sample is no longer touching the kelp forest.", + "type": "yesno", + "default": "no" + }, + { + "id": "M14_4", + "title": "Number of trident pieces no longer touching the shipwreck.", + "options": [ + { + "value": "0", + "title": "0" + }, + { + "value": "1", + "title": "1" + }, + { + "value": "2", + "title": "2" + } + ], + "type": "enum", + "default": "0" + }], + "score": [function(M14_1, M14_2, M14_3, M14_4) { + M14_1 = String(M14_1); + M14_2 = String(M14_2); + M14_3 = String(M14_3); + M14_4 = Number(M14_4); + if (M14_1 === 'yes' && M14_2 === 'yes' && M14_3 === 'yes') { + switch (M14_4) { + case 0: + return 25; + case 1; + return 45; + case 2: + return 55; + } + } + if (M14_1 === 'yes' && M14_2 === 'yes' && M14_3 === 'no' || M14_1 === 'yes' && M14_2 === 'no' && M14_3 === 'yes') { + switch (M14_4) { + case 0: + return 15; + case 1: + return 35; + case 2: + return 45; + } + } + if (M14_1 === 'yes' && M14_2 === 'no' && M14_3 === 'no') { + switch (M14_4) { + case 0: + return 5; + case 1: + return 25; + case 2: + return 35; + } + } + if (M14_1 === 'no' && M14_2 === 'yes' && M14_3 === 'yes') { + switch (M14_4) { + case 0: + return 20; + case 1: + return 40; + case 2: + return 50; + } + } + if (M14_1 === 'no' && M14_2 === 'yes' && M14_3 === 'no' || M14_1 === 'no' && M14_2 === 'no' && M14_3 === 'yes') { + switch (M14_4) { + case 0: + return 10; + case 1: + return 30; + case 2: + return 40; + } + } + if (M14_1 === 'no' && M14_2 === 'no' && M14_3 === 'no') { + switch (M14_4) { + case 0: + return 0; + case 1: + return 20; + case 2: + return 30; + } + } + }] + }, + { + "id": "M15 RESEARCH VESSEL", + "description": "N/A", + "options": [{ + "id": "M15_1", + "title": "Number of samples, trident part(s), or treasure chest at least partly in the research vessel's cargo area.", + "options": [{ + "title": "0", + "value": "0" + }, + { + "title": "1", + "value": "1" + }, + { + "title": "2", + "value": "2" + }, + { + "title": "3", + "value": "3" + }, + { + "title": "4", + "value": "4" + }, + { + "title": "5", + "value": "5" + }, + { + "title": "6", + "value": "6" + }], + "type": "enum", + "default": "0" + }, + { + "id": "M15_2", + "title": "The ports latch is at least partly in the research vessel's loop.", + "type": "yesno", + "default", "no" + }], + "score": [function (M15_1, M15_2) { + M15_1 = Number(M15_1); + M15_2 = String(M15_2); + if (M15_2 === 'yes') { + return M15_1 * 5 + 20; + } + if (M15_3 === 'no') { + return M15_1 * 5; + } + }] } }], "strings": { From 9a3b0873d7a56f606113dfadce54fb3030b871b1 Mon Sep 17 00:00:00 2001 From: Korbin Gugisberg Date: Fri, 16 Aug 2024 15:29:51 -0700 Subject: [PATCH 11/16] Added Precision and GP --- challenges/js/2024_US.js | 84 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/challenges/js/2024_US.js b/challenges/js/2024_US.js index a1af16c1..8715b49d 100644 --- a/challenges/js/2024_US.js +++ b/challenges/js/2024_US.js @@ -596,6 +596,90 @@ return M15_1 * 5; } }] + }, + { + "id": "PRECISION TOKENS", + "description": "N/A", + "options": [{ + "id": "PT", + "title": "Number of precision tokens remaining.". + "options": [ + { + "title": "0", + "value": "0" + }, + { + "title": "1", + "value": "1" + }, + { + "title": "2", + "value": "2" + }, + { + "title": "3", + "value": "3" + }, + { + "title": "4", + "value": "4" + }, + { + "title": "5", + "value": "5" + }, + { + "title": "6", + "value": "6" + } + ], + "type": "enum", + "default": "6" + }], + "score": [function(PT) { + PT = Number(PT) { + case 0: + return 0; + case 1: + return 10; + case 2: + return 15; + case 3: + return 25; + case 4: + return 35; + case 5: + return 50; + case 6: + return 50; + } + }] + }, + { + "id": "GRACIOUS PROFESSIONALISM", + "description": "N/A", + "options": [{ + "id": "GP", + "title": "Gracious Professionalism displayed at the robot game table.". + "options": [ + { + "title": "DEVELOPING 2", + "value": "2" + }, + { + "title": "ACCOMPLISHED 3", + "value": "3" + }, + { + "title": "EXCEEDS 4", + "value": "4" + }], + "type": "enum", + "default": "3", + }], + "score": [function(GP) { + return 0; + }] } }], "strings": { From 1bf361bf517e942a4eb16261221655db4302822a Mon Sep 17 00:00:00 2001 From: Korbin Gugisberg Date: Sat, 7 Sep 2024 19:57:02 -0700 Subject: [PATCH 12/16] A bunch of tiny fixes with json formatting and other bugs --- challenges/js/2024_US.js | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/challenges/js/2024_US.js b/challenges/js/2024_US.js index 8715b49d..733ca588 100644 --- a/challenges/js/2024_US.js +++ b/challenges/js/2024_US.js @@ -6,9 +6,8 @@ "objectives": [{ "id": "EI", "title": "The robot and all equipment fit completely in one launch area and under the height limit", - "type": "yesno" + "type": "yesno", "default": "no" - " }], "score": [function(EI) { EI = String(EI); @@ -40,8 +39,7 @@ "title": "The coral buds are flipped up.", "type": "yesno", "default": "no" - } - ], + }], "score": [function(M01_1, M01_2, M01_3) { M01_1 = String(M01_1); M01_2 = String(M01_2); @@ -125,7 +123,7 @@ }, { "value": "2", - "title": "2", + "title": "2" }, { "value": "3", @@ -142,7 +140,7 @@ if (M03_1 === 'yes') { return M03_2 * 5 + 20; } - if (M03_2 === 'no') { + if (M03_1 === 'no') { return M03_2 * 5; } }] @@ -158,7 +156,7 @@ }, { "id": "M04_2", - "title": "The scuba diver is hanging on the coral reef support.". + "title": "The scuba diver is hanging on the coral reef support.", "type": "yesno", "default": "no" }], @@ -258,7 +256,7 @@ }, { "value": "4", - "title": "4", + "title": "4" } ], "type": "enum", @@ -280,7 +278,7 @@ }, { "id": "M09_2", - "title": "The unknown creature is at least partly in the cold seep.". + "title": "The unknown creature is at least partly in the cold seep.", "type": "yesno", "default": "no" }], @@ -367,11 +365,11 @@ "score": [function(M11_1) { M11_1 = String(M11_1); switch (M11_1) { - case "0": + case '0': return 0; - case "1": + case '1': return 20; - case "2": + case '2': return 30; } }] @@ -405,7 +403,7 @@ }, { "value": "5", - "title": "5", + "title": "5" } ], "type": "enum", @@ -584,7 +582,7 @@ "id": "M15_2", "title": "The ports latch is at least partly in the research vessel's loop.", "type": "yesno", - "default", "no" + "default": "no" }], "score": [function (M15_1, M15_2) { M15_1 = Number(M15_1); @@ -602,7 +600,7 @@ "description": "N/A", "options": [{ "id": "PT", - "title": "Number of precision tokens remaining.". + "title": "Number of precision tokens remaining.", "options": [ { "title": "0", @@ -637,7 +635,8 @@ "default": "6" }], "score": [function(PT) { - PT = Number(PT) { + PT = Number(PT) + switch (PT) { case 0: return 0; case 1: @@ -660,7 +659,7 @@ "description": "N/A", "options": [{ "id": "GP", - "title": "Gracious Professionalism displayed at the robot game table.". + "title": "Gracious Professionalism displayed at the robot game table.", "options": [ { "title": "DEVELOPING 2", @@ -675,13 +674,13 @@ "value": "4" }], "type": "enum", - "default": "3", + "default": "3" }], "score": [function(GP) { return 0; }] - } - }], + }, + ], "strings": { "yes": "Yes", "no": "No", From f562a4664f945cfb0f554da1aa40ff8058356252 Mon Sep 17 00:00:00 2001 From: Korbin Gugisberg <63560639+Galaxy-jpg@users.noreply.github.com> Date: Sat, 7 Sep 2024 20:51:13 -0700 Subject: [PATCH 13/16] fixed semi-colon misplacement --- challenges/js/2024_US.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/js/2024_US.js b/challenges/js/2024_US.js index 733ca588..ad7649a7 100644 --- a/challenges/js/2024_US.js +++ b/challenges/js/2024_US.js @@ -483,7 +483,7 @@ switch (M14_4) { case 0: return 25; - case 1; + case 1: return 45; case 2: return 55; From d832ca8bfa4a198ff26f58650ffbd523cb5de3e5 Mon Sep 17 00:00:00 2001 From: Celeste Gugisberg <63560639+Galaxy-jpg@users.noreply.github.com> Date: Sat, 30 Nov 2024 15:02:06 -0700 Subject: [PATCH 14/16] Update module.yml --- module.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module.yml b/module.yml index 84ddc8a1..1e6662e8 100644 --- a/module.yml +++ b/module.yml @@ -10,7 +10,7 @@ config: - name: year display: Challenge type: values - default: 2024 SUBMERGED + default: 2024 SUBMERGED values: - 2024 SUBMERGED - 2023 MASTERPIECE From 6ddcc1c6b6cc4cd8044fdd893f37dd36fb9fcf44 Mon Sep 17 00:00:00 2001 From: Celeste Gugisberg <63560639+Galaxy-jpg@users.noreply.github.com> Date: Sat, 30 Nov 2024 15:02:56 -0700 Subject: [PATCH 15/16] Update 2024_US.js --- challenges/js/2024_US.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/challenges/js/2024_US.js b/challenges/js/2024_US.js index ad7649a7..acd9eba2 100644 --- a/challenges/js/2024_US.js +++ b/challenges/js/2024_US.js @@ -542,9 +542,9 @@ }] }, { - "id": "M15 RESEARCH VESSEL", + "title": "M15 RESEARCH VESSEL", "description": "N/A", - "options": [{ + "objectives": [{ "id": "M15_1", "title": "Number of samples, trident part(s), or treasure chest at least partly in the research vessel's cargo area.", "options": [{ @@ -596,9 +596,9 @@ }] }, { - "id": "PRECISION TOKENS", + "title": "PRECISION TOKENS", "description": "N/A", - "options": [{ + "objectives": [{ "id": "PT", "title": "Number of precision tokens remaining.", "options": [ @@ -655,9 +655,9 @@ }] }, { - "id": "GRACIOUS PROFESSIONALISM", + "title": "GRACIOUS PROFESSIONALISM", "description": "N/A", - "options": [{ + "objectives": [{ "id": "GP", "title": "Gracious Professionalism displayed at the robot game table.", "options": [ From bc9e61d791dc4a7d002eadc8109cf3baf67c0dde Mon Sep 17 00:00:00 2001 From: Celeste Gugisberg <63560639+Galaxy-jpg@users.noreply.github.com> Date: Sat, 30 Nov 2024 15:10:02 -0700 Subject: [PATCH 16/16] Fixed Mission 13 --- challenges/js/2024_US.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/challenges/js/2024_US.js b/challenges/js/2024_US.js index acd9eba2..1c14aee7 100644 --- a/challenges/js/2024_US.js +++ b/challenges/js/2024_US.js @@ -423,12 +423,12 @@ "type": "yesno", "default": "no" }], - "score": [function(M12_1) { - M12_1 = String(M12_1); - if (M12_1 === 'yes') { + "score": [function(M13_1) { + M13_1 = String(M13_1); + if (M13_1 === 'yes') { return 20; } - if (M12_1 === 'no') { + if (M13_1 === 'no') { return 0; } }]