summaryrefslogtreecommitdiffstats
path: root/wat/db.go
diff options
context:
space:
mode:
Diffstat (limited to 'wat/db.go')
-rw-r--r--wat/db.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/wat/db.go b/wat/db.go
index 5784acb..a79da09 100644
--- a/wat/db.go
+++ b/wat/db.go
@@ -18,6 +18,12 @@ type Player struct {
Health int64
LastMined int64
LastRested int64
+ CoinsLost int64
+}
+
+func (p *Player) LoseCoins(coins int64) {
+ p.Coins -= coins
+ p.CoinsLost += coins
}
func (p *Player) Conscious() bool {