diff options
Diffstat (limited to 'internal/game/utils.go')
| -rw-r--r-- | internal/game/utils.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/internal/game/utils.go b/internal/game/utils.go index 2379fc2..55e48c6 100644 --- a/internal/game/utils.go +++ b/internal/game/utils.go @@ -60,6 +60,20 @@ func uniqueItemNames(matches []itemMatch) []string { return out } +func (g *Game) showWhichOne(sess *net.Session, matches []itemMatch) { + sess.WriteLine("Which one?") + seen := make(map[string]bool) + for _, m := range matches { + if seen[m.Name] { + continue + } + seen[m.Name] = true + def, _ := g.ItemStore.Load(m.ID) + coloredName := g.itemColorize(sess, def, m.Name) + sess.WriteLine(fmt.Sprintf(" - %s", coloredName)) + } +} + func randInt(max int) int { if max <= 0 { return 0 |
