From e96d81a7b46677615338fa54ed8ce8f23603e5fc Mon Sep 17 00:00:00 2001 From: Kistaro Windrider Date: Sun, 2 Apr 2023 19:07:05 -0700 Subject: [PATCH] Fencepost error! Also the title is visible. --- cardsim/terminalui.go | 2 +- smoketest/main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cardsim/terminalui.go b/cardsim/terminalui.go index 0f32ccf..11afa70 100644 --- a/cardsim/terminalui.go +++ b/cardsim/terminalui.go @@ -135,7 +135,7 @@ func pickNextAction[C StatsCollection](p *Player[C]) (isCard bool, cardIdx int, cls() displayOnePanel(p, p.InfoPanels[i-1]) wait() - } else if i < handOffset { + } else if i <= handOffset { i = i - actionsOffset - 1 option, promptErr := promptCard(p, p.PermanentActions[i]) if option >= 0 || IsSeriousError(promptErr) { diff --git a/smoketest/main.go b/smoketest/main.go index e27f6f3..9229ea1 100644 --- a/smoketest/main.go +++ b/smoketest/main.go @@ -54,7 +54,7 @@ func main() { type prompt struct{} func (prompt) Title(p *cardsim.Player[*SmokeTestCollection]) cardsim.Message { - return cardsim.MsgStr("Prompt title -- should not be visible?") + return cardsim.MsgStr("Smoke Test") } func (prompt) Info(p *cardsim.Player[*SmokeTestCollection]) ([]cardsim.Message, error) {