File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/bundles/robot_minigame Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -435,10 +435,11 @@ export function entered_colors(
435435 // Testing functions should only run after the simulation is complete
436436 if ( ! state . isComplete ) return false ;
437437
438- return state . areaLog
438+ const coloredAreas = state . areaLog
439439 . filter ( area => colors . includes ( area . flags . color ) ) // Filter relevant colors
440- . filter ( filterAdjacentDuplicateAreas ) // Filter adjacent duplicates
441- . every ( ( { flags : { color } } , i ) => color === colors [ i ] ) ; // Check if each area has the expected color
440+ . filter ( filterAdjacentDuplicateAreas ) ; // Filter adjacent duplicates
441+
442+ return coloredAreas . length === colors . length && coloredAreas . every ( ( { flags : { color } } , i ) => color === colors [ i ] ) ; // Check if each area has the expected color
442443}
443444
444445// ==================
You can’t perform that action at this time.
0 commit comments