-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathskills.go
36 lines (32 loc) · 801 Bytes
/
skills.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package aifiver
// Skill for various aspects
type Skill int
// Various skill types.
const (
TSkillDiplomacy Skill = iota // Negotiation
TSkillMartial // Tactical skills
TSkillStewardship
TSkillIntrigue
TSkillLearning
TSkillProwess
TSkillHealth
TSkillParenting
)
// skillToString is a mapping from skill to string.
var skillToString = map[Skill]string{
TSkillDiplomacy: "diplomacy",
TSkillMartial: "martial",
TSkillStewardship: "stewardship",
TSkillIntrigue: "intrigue",
TSkillLearning: "learning",
TSkillProwess: "prowess",
TSkillHealth: "health",
TSkillParenting: "parenting",
}
// String implements the stringer function for a skill.
func (s Skill) String() string {
if str, ok := skillToString[s]; ok {
return str
}
return "unknown"
}