Looked up how to properly format strings at long last

This commit is contained in:
Nox Sluijtman 2022-09-07 16:04:41 +02:00
parent 7d503d5621
commit da8f1fdd87

View file

@ -281,7 +281,7 @@ func printStatList(verbose bool) {
proficiency = "Not proficient"
}
score := char.Stats[i].Score
fmt.Printf("Stat: %s\t%s\tStat score: %d\tStat modifier: %d\n", name, proficiency, score, getModifier(char.Stats[i]))
fmt.Printf("Stat: %13s\t%s\tStat score: %2d\tStat modifier: %2d\n", name, proficiency, score, getModifier(char.Stats[i]))
}
} else {
for i := 0; i < len(char.Stats); i++ {
@ -310,7 +310,7 @@ func printSkillList(verbose bool) {
} else {
expertise = "Doesn't have expertise"
}
fmt.Printf("Skill: %s\tSkill modifier: %d\t%s\t%s\n", name, localModifier, proficiency, expertise)
fmt.Printf("Skill:%16s\tSkill modifier:%3d\t%s\t%s\n", name, localModifier, proficiency, expertise)
}
} else {
for i := 0; i < len(char.Skills); i++ {