Skip to content

Commit 91f9e78

Browse files
adding total base points to stats flag (#87)
1 parent dc19f3f commit 91f9e78

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

flags/pokemonflagset.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,13 @@ func StatsFlag(endpoint string, pokemonName string) error {
174174
printBar(customName, stat.BaseStat, maxWidth, maxValue, style)
175175
}
176176

177+
totalBaseStats := 0
178+
for _, stat := range pokemonStruct.Stats {
179+
totalBaseStats += stat.BaseStat
180+
}
181+
182+
fmt.Printf("%-10s %d\n", "Total", totalBaseStats)
183+
177184
return nil
178185
}
179186

0 commit comments

Comments
 (0)