Please enable JavaScript.
Coggle requires JavaScript to display documents.
Dice Sorting (Current Method (OLD BS) (Scoring 6 dice (comparing each…
Dice Sorting
Current Method (OLD BS)
-
scoring non-6 dice
problematic
Is it counting every 5 & 1, regardless of whether that # is in a single/triple/etc?
-
Proposal :champagne:
Loops
After a scoring dice or set of dice is detected, it's removed from the list.
Since the loop will be able to handle lists of various sizes, this will improve functionality when any number of dice are selected for banking as well.
When a die is clicked and then banked, those dice will be inserted into this new list
Algorithm
-
-
-
-
Farkle checks.
Just run the algorithm to the right for all 'un-banked'/new dice from the roll. If the result for the 'scoring' procedure is zero, then it's a farkle.
Therefore, it migh be good to take the scoring algorithm and have it add to a 'temp-score' value, that can be checked for farkle checks, and separately added to the real score variable for actual scoring
All done. Do with the temp-score variable as you will, if that's been implemented. Otherwise, the score is already set.
A List will be edited. Perhaps use new list if the GlobalScore list is being used elsewhere after the scoring operation
-
-
Selection of Dice
Save Button
-
-
(optional backup location for user-error detection. See bright red notes on far right of algorithm section
User selects dice
Dice Variables
'Disabled', or an 'Not-banked-this-turn'/'already banked' variable
On-click function
Forbid de-selection 'by hand' if the die has been banked previously. Use if statement and above-mentioned variable.
-