Is using MultiMaps code smell? If so what alternative data structures fit my needs?
- by Pureferret
I'm trying to model nWoD characters for a roleplaying game in a character builder program. The crux is I want to support saving too and loading from yaml documents.
One aspect of the character's is their set of skills. Skills are split between exactly three 'types': Mental, Physical, and Social. Each type has a list of skills under if. My Yaml looks like this:
PHYSICAL:
Athletics: 0
Brawl: 3
MENTAL:
Academics: 2
Computers
My initial thought was to use a Multimap of some sort, and have the skill type as an Enum, and key to my map. Each Skill is an element in the collection that backs the multimap.
However, I've been struggling to get the yaml to work. On explaining this to a colleague outside of work they said this was probably a sign of code smell, and he's never seen it used 'well'.
Are multiMaps really code smell? If so what alternate data structures would suit my goals?