tIncrease flag count to 7 - scoreboard - Interactive scoreboard for CTF-like games
 (HTM) git clone git://git.z3bra.org/scoreboard.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
 (DIR) commit 0e0fc721fd11bc9c9f21e293177df1dbb9e4229a
 (DIR) parent b1a8eb06be6bde0ee97f6e16c37c4f7f0330e09f
 (HTM) Author: Willy Goiffon <contact@z3bra.org>
       Date:   Tue, 22 Aug 2023 07:52:56 +0200
       
       Increase flag count to 7
       
       Diffstat:
         M html.go                             |       2 +-
         M main.go                             |       2 +-
         M player.go                           |       2 +-
         M ui.go                               |       4 ++--
       
       4 files changed, 5 insertions(+), 5 deletions(-)
       ---
 (DIR) diff --git a/html.go b/html.go
       t@@ -73,7 +73,7 @@ func (a *Application) GenerateHTML() {
                                data.Placeholders = append(data.Placeholders, Boardline{
                                        Name: "AAA",
                                        Rank: humanize.Ordinal(i+1),
       -                                Flag: ".....",
       +                                Flag: ".......",
                                        Score: "00000",
                                })
                        }
 (DIR) diff --git a/main.go b/main.go
       t@@ -29,7 +29,7 @@ import (
        )
        
        const (
       -        BOARD_WIDTH int = 26
       +        BOARD_WIDTH int = 28
                BOARD_HEIGHT int = 15
                HTML string = "score.html"
                DB string = "score.db"
 (DIR) diff --git a/player.go b/player.go
       t@@ -125,7 +125,7 @@ func (p *Player) FlagRank() int {
        }
        
        func (p *Player) FlagStr() string {
       -        var str [5]byte
       +        var str [7]byte
                for i:=0; i <len(str); i++ {
                        if i < p.flag {
                                str[i] = 'X'
 (DIR) diff --git a/ui.go b/ui.go
       t@@ -23,7 +23,7 @@ func BoardHeader() *tview.TextView {
                return tview.NewTextView().
                        SetDynamicColors(true).
                        SetTextAlign(tview.AlignRight).
       -                SetText("[::b] RANK  NAME  FLAGS  SCORE ")
       +                SetText("[::b] RANK  NAME   FLAGS   SCORE ")
        }
        
        func RankTable(offset, limit, rank int, fill bool) *tview.Table {
       t@@ -61,7 +61,7 @@ func RankTable(offset, limit, rank int, fill bool) *tview.Table {
                                scorestr := fmt.Sprintf("%4d", 0)
                                t.SetCell(i, 0, newcell(rankstr).SetTextColor(tcell.ColorGray))
                                t.SetCell(i, 1, newcell("AAA").SetTextColor(tcell.ColorGray))
       -                        t.SetCell(i, 2, newcell(".....").SetTextColor(tcell.ColorGray))
       +                        t.SetCell(i, 2, newcell(".......").SetTextColor(tcell.ColorGray))
                                t.SetCell(i, 3, newcell(scorestr).SetTextColor(tcell.ColorGray))
                        }
                }