aboutsummaryrefslogtreecommitdiff
path: root/go/ui/textBox.go
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2023-01-31 00:16:53 +0100
committerFlorian Fischer <florian.fischer@muhq.space>2025-01-27 16:43:45 +0100
commite6a1bb4ba06361abdc2cf1bed4041fe3013b188b (patch)
treec329a9d8d071bd2a5e3d6b5bb531da67ece2b227 /go/ui/textBox.go
parent24cea3f7c1e3679ba19ed1d49674e1228eb50ce1 (diff)
downloadmuhqs-game-e6a1bb4ba06361abdc2cf1bed4041fe3013b188b.tar.gz
muhqs-game-e6a1bb4ba06361abdc2cf1bed4041fe3013b188b.zip
intermediate commit
Diffstat (limited to 'go/ui/textBox.go')
-rw-r--r--go/ui/textBox.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/go/ui/textBox.go b/go/ui/textBox.go
index dd10e8e2..78199410 100644
--- a/go/ui/textBox.go
+++ b/go/ui/textBox.go
@@ -55,7 +55,7 @@ func NewCenteringAutoTextBox(x, y int, t string) *TextBox {
func NewUnitInfo(x, y int, u *game.Unit) *TextBox {
info := fmt.Sprintf("%s\nDamage: %d\nHealth: %d\nUpkeep: %d",
- u.String(), u.GetDamage(), u.Health, u.Upkeep)
+ u.String(), u.Damage(), u.Health, u.Upkeep)
if u.Movement != game.INVALID_MOVEMENT() {
info = fmt.Sprintf("%s\nMovement: %s", info, u.Movement.String())
@@ -69,8 +69,7 @@ func NewUnitInfo(x, y int, u *game.Unit) *TextBox {
}
func NewPermInfo(x, y int, p game.Permanent) *TextBox {
- info := fmt.Sprintf("%s\nDamage: %d",
- p.String(), p.GetDamage())
+ info := fmt.Sprintf("%s\nDamage: %d", p.String(), p.Damage())
return NewAutoTextBox(x, y, info)
}
@@ -135,7 +134,7 @@ func NewPocList(centerX, bottomY int, poc game.PileOfCards) *PocList {
func (w *PocList) setText() {
t := ""
- for _, c := range w.poc.GetCards() {
+ for _, c := range w.poc.Cards() {
t = fmt.Sprintf("%s%s\n", t, c.Name)
}
@@ -151,7 +150,7 @@ func (w *PocList) setText() {
}
func (w *PocList) FindObjectAt(x, y int) interface{} {
- cards := w.poc.GetCards()
+ cards := w.poc.Cards()
if len(cards) == 0 {
return nil
}