diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2025-07-24 20:05:27 -0400 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-07-28 18:03:10 +0200 |
| commit | d4e04a8736adb91c84323608b67bfa67c28f09cb (patch) | |
| tree | a3159b0a5c89dd754e84658ff59e02e433aaea30 /go/game/permanent.go | |
| parent | 76f79f077dbe3ccc7fe12d803231856396573e3a (diff) | |
| download | muhqs-game-d4e04a8736adb91c84323608b67bfa67c28f09cb.tar.gz muhqs-game-d4e04a8736adb91c84323608b67bfa67c28f09cb.zip | |
support unit state marks
Diffstat (limited to 'go/game/permanent.go')
| -rw-r--r-- | go/game/permanent.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/go/game/permanent.go b/go/game/permanent.go index 278524fa..12eb3d16 100644 --- a/go/game/permanent.go +++ b/go/game/permanent.go @@ -76,6 +76,7 @@ func newPermanentBase(card *Card, tile *Tile, owner *Player) permanentBase { tile: tile, controller: owner, owner: owner, + marks: make(map[PermanentMark]int), } } @@ -202,11 +203,7 @@ func (p *permanentBase) Marks(mark PermanentMark) int { } func (p *permanentBase) adjustMarks(mark PermanentMark, amount int) { - if amount, found := p.marks[mark]; found { - p.marks[mark] += amount - } else { - p.marks[mark] = amount - } + p.marks[mark] += amount } func (p *permanentBase) CurrentlyAvailActions() []Action { return nil } |
