tDo not display a token for 7th flag - scoreboard - Interactive scoreboard for CTF-like games
(HTM) git clone git://git.z3bra.org/scoreboard.git
(DIR) Log
(DIR) Files
(DIR) Refs
---
(DIR) commit 574274c9d77481b0c1f593502f3990c381ba3936
(DIR) parent 4e55278ba45d60e799d7ffa66788b8db4ab81db5
(HTM) Author: Willy Goiffon <contact@z3bra.org>
Date: Thu, 7 Sep 2023 22:08:14 +0200
Do not display a token for 7th flag
Diffstat:
M ui.go | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/ui.go b/ui.go
t@@ -106,7 +106,9 @@ func (a *Application) HighlightBoard(line int) {
AddItem(RankTable(0, -1, 0, true).Select(line - 1, 0), BOARD_HEIGHT, 1, true)
a.app.SetFocus(a.board)
- a.frame.AddText(fmt.Sprintf(" 🔑%s", a.player.token), false, tview.AlignCenter, 0)
+ if (a.flag < 7) {
+ a.frame.AddText(fmt.Sprintf(" 🔑%s", a.player.token), false, tview.AlignCenter, 0)
+ }
}
func (a *Application) NewPlayer(rank int) {