Addresses issue #183, concerning the incorrect generation of consecutive tricks in combos, which should not not have any consecutive tricks.
The problem seemed to stem from two places:
The isAnyComboConditionFulfilled function did not cover all cases quite right and was very hard to untangle. The function was therefore refactored so that there is now less nesting of if-else-statements. The logical errors were fixed in the process.
When loading the tricks using services/db.js via the fillComboWithTricks function, the returned tricks get sorted so that tricks that have the same id (and therefore are the same trick) are placed right after each other. The issue was fixed by removing the filtering and sorting of the result. Please verify if the filtering and sorting did not actually serve a purpose since to my eyes they didn't seem to change the data in any other way than to alter the ordering.
Addresses issue #183, concerning the incorrect generation of consecutive tricks in combos, which should not not have any consecutive tricks.
The problem seemed to stem from two places:
isAnyComboConditionFulfilled
function did not cover all cases quite right and was very hard to untangle. The function was therefore refactored so that there is now less nesting of if-else-statements. The logical errors were fixed in the process.services/db.js
via thefillComboWithTricks
function, the returned tricks get sorted so that tricks that have the same id (and therefore are the same trick) are placed right after each other. The issue was fixed by removing the filtering and sorting of the result. Please verify if the filtering and sorting did not actually serve a purpose since to my eyes they didn't seem to change the data in any other way than to alter the ordering.