KNK.JS - Possible Scores Bugs
From
WitNik@VERT/BGGRSCYN to
All on Monday, November 30, 2020 20:09:16
All,
Here's a copy of the scores file being generated on my board:
* Kannons and Katapults Scoreboard for the Month of November *
Rank Name Games Wins Losses Win % Score --------------------------------------------------------------------
0 The Mandalorian 1 1 0 100 % 20,925
1 WitNik 1 0 1 0 % 0 --------------------------------------------------------------------
* Kannons and Katapults Total Score for the Month of January *
Rank Name Games Wins Losses Win % Score --------------------------------------------------------------------
1 All Users 1 0 1 0 % 20,925
2 King Computer 1 1 0 100 % 19,183 --------------------------------------------------------------------
There were 2 games played in November. One by WitNik (who lost) and one by The Mandalorian who won. The top portion looks ok, but the ranking doesn't begin with 1 it begins with 0 (minor issue).
I believe the bottom portion is supposed to show the totals for the same month.
In this case, there should be 2 games for all users with 1 win and 1 loss, along with a 50% 'Win %' and the same for King Computer. The total number of games and win/loss columns are off, but the scores columns are correct.
Also, title of the second section refers to "Month of January" vs. the current month. When referencing the code, line 1501 is not using the "+nowmonth+" variable from section 1, so the title is probably an easy fix.
In further referencing the code, it looks like the variables computer_wins and computer_losses are reused in most of the second section and appear to lead to the source of the miscalculations. I haven't gone futher as I wanted to know if it is more preferable to attempt to produce a fix for something like this or if it better to offer a detailed report?
Thanks,
-WitNik
---
■ Synchronet ■ * Origin: Beggar's Canyon - beggarscyn.com *