From 4bc12d30bda86c225f36afd5eae2a0667b269c8c Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Mon, 2 Mar 2020 14:54:49 -0800 Subject: [PATCH] Do not list tutorial boxes in the ranking. We still rank these (raw ranking data) but they're no longer part of the top rankings. --- main.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/main.go b/main.go index 55cce76..2960052 100644 --- a/main.go +++ b/main.go @@ -205,6 +205,7 @@ func main() { // make main slice series_data := make(map[string]interface{}) + tutorial_boxes := make(map[int]bool) for i := range series { c := 0 s := make(map[string]interface{}) @@ -225,6 +226,9 @@ func main() { dd["name"] = boxes[j].name break } + if (series[i].series_id == 3) { + tutorial_boxes[id] = true + } } d[fmt.Sprintf("%v", c)] = dd } @@ -655,6 +659,11 @@ func main() { c = 0 var boxes_topranks = make(map[string]string) for i := range boxes { + // remove tutorial boxes from the box ranking. + if (tutorial_boxes[boxes[i].box_id]) { + continue + } + c = c + 1 boxes_topranks[fmt.Sprintf("%v", c)] = fmt.Sprintf("%v: \"%v\" by %v", boxes[i].box_id, boxes[i].name, boxes[i].builder) if c > ranklen {