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.
This commit is contained in:
Auke Kok 2020-03-02 14:54:49 -08:00
parent ae988d5fe9
commit 4bc12d30bd

View File

@ -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 {