feat: westworldwithwoman. add elsa

This commit is contained in:
jonas committed 2026-09-03 21:28:28 +02:00
1 parent 2764849943
commit 0e7482e04c
28 files changed
+1946

No files matched your search

@@ -0,0 +1,21 @@
package westworldwithwoman
import "fmt"
// entityNames is a temporary stand-in for the book's real name
// lookup table. We still haven't been shown that table, so this is
// just a small map we're filling in by hand as we meet entities -
// the miner (ID 1) and now his wife Elsa (ID 2).
var entityNames = map[int]string{
1: "Miner Bob",
2: "Elsa",
}
// GetNameOfEntity looks up a friendly name for a given entity ID.
// Anything not in entityNames falls back to printing the raw ID.
func GetNameOfEntity(id int) string {
if name, ok := entityNames[id]; ok {
return name
}
return fmt.Sprintf("Entity %d", id)
}