From 0f2102064728eea817e5bf29278a12211162850a Mon Sep 17 00:00:00 2001 From: Kistaro Windrider Date: Sun, 2 Apr 2023 19:08:26 -0700 Subject: [PATCH] More fencepost errors! --- cardsim/terminalui.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cardsim/terminalui.go b/cardsim/terminalui.go index 11afa70..db1dc84 100644 --- a/cardsim/terminalui.go +++ b/cardsim/terminalui.go @@ -265,7 +265,7 @@ func promptCard[C StatsCollection](p *Player[C], card Card[C]) (optionIdx int, e } fmt.Println() if valid { - fmt.Printf("Go (B)ack, (Q)uit, or enact a choice (1 - %d)? > ", len(opts)+1) + fmt.Printf("Go (B)ack, (Q)uit, or enact a choice (1 - %d)? > ", len(opts)) } else { fmt.Print("Go (B)ack or (Q)uit? > ") } @@ -507,7 +507,7 @@ func review[C StatsCollection](p *Player[C]) error { cls() displayOnePanel(p, p.InfoPanels[i-1]) wait() - } else if i < handOffset { + } else if i <= handOffset { i = i - actionsOffset - 1 _, _, err := displayCard(p, p.PermanentActions[i], false) errs.Add(err)