aboutsummaryrefslogtreecommitdiff
path: root/internal/game/core_utils.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-07-04 19:32:05 -0400
committerhistoria <[not public]>2026-07-04 19:32:05 -0400
commit7b009e904524f30cbff6346730e8d8fe4b046a6b (patch)
tree2e1b364f9efc4f82ebf67c492642951dfcc13b4b /internal/game/core_utils.go
parenta5d4ead1795882d25da7eda53680d2a84590693d (diff)
downloadthehouseoficarus-7b009e904524f30cbff6346730e8d8fe4b046a6b.tar.gz
feat: add casino chips, change drops to chips
Diffstat (limited to 'internal/game/core_utils.go')
-rw-r--r--internal/game/core_utils.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/internal/game/core_utils.go b/internal/game/core_utils.go
index 2855bcf..71d0acb 100644
--- a/internal/game/core_utils.go
+++ b/internal/game/core_utils.go
@@ -149,3 +149,13 @@ func (g *Game) newInventorySlot(itemID string, qty int) *player.InventorySlot {
}
return slot
}
+
+func countChips(p *player.Player) int {
+ total := 0
+ for _, slot := range p.Inventory {
+ if slot != nil && slot.ItemID == "chips" {
+ total += slot.Quantity
+ }
+ }
+ return total
+}