Skip to content

Commit 6ee6a86

Browse files
updating egg group names to modern equivalents (#190)
1 parent d991b6f commit 6ee6a86

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

cmd/pokemon/pokemon.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,20 @@ func PokemonCommand() (string, error) {
112112
capitalizedEggGroup := cases.Title(language.English).String(entry.Name)
113113
eggGroupSlice = append(eggGroupSlice, capitalizedEggGroup)
114114
}
115+
modernEggGroupNames = map[string]string{
116+
"indeterminate": "Amorphous",
117+
"ground": "Field",
118+
"humanshape": "Human-Like",
119+
"plant": "Grass",
120+
"no-eggs": "Undiscovered",
121+
}
122+
123+
if name, exists := modernEggGroupNames[entry.Name]; exists {
124+
eggGroupSlice = append(eggGroupSlice, name)
125+
} else {
126+
capitalizedEggGroup := cases.Title(language.English).String(entry.Name)
127+
eggGroupSlice = append(eggGroupSlice, capitalizedEggGroup)
128+
}
115129

116130
}
117131

0 commit comments

Comments
 (0)