This problem teaches you arrays of structs. When you have multiple entities with the same attributes, store them in an array of custom types. This keeps related data together and scales cleanly.
You learned the all-pairs comparison pattern. Nested loops let you examine every combination. Remember to skip self-comparisons when objects can't interact with themselves. This appears in scheduling and collision detection.
Structs prevent parallel array bugs. Instead of separate arrays where indices might desync, structs guarantee each team's colors stay paired. This makes code more maintainable.