From e69fc189667f148923ce327f115b05913b276409 Mon Sep 17 00:00:00 2001 From: steven carpenter Date: Mon, 30 Jun 2025 17:33:59 -0400 Subject: [PATCH] fix bugs related to vendoring --- main.go | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/main.go b/main.go index 3c9dc91..36ac960 100644 --- a/main.go +++ b/main.go @@ -91,14 +91,17 @@ func main() { return } - if players == nil || len(*players) == 0 { - fmt.Println("No players online.") - } else { - fmt.Printf("Players online:\n") - for _, p := range *players { - fmt.Printf(" - Name: %s, Score: %d, Duration: %s\n", p.Name, p.Score, p.Duration) - } - } + if players == nil || len(*players) == 0 { + fmt.Println("No players online.") + } else { + maxIndex := byte(0) + for _, p := range *players { + if p.Index > maxIndex { + maxIndex = p.Index + } + } + fmt.Printf("Highest player index: %d\n", maxIndex) + } } func versionCompare(a, b string) int {