Commit f6868ca
authored
optimize "Sky Striker Alternative - Lemnis Gate"
avoid taking too much time to compute combinations when there are a lot of candidate cards
* infer the spell count by subtracting the monster count from the subgroup count, instead of looping through the cards again
* stop looking for more candidate subgroups if the remaining spell count can never match the current monster count (or vice-versa)
* limit the max number of cards that can be selected to be twice whichever is lower between the monster count and the spell count in the full group (which are pre-computed outside the rescon)1 parent ef77149 commit f6868ca
1 file changed
+15
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
40 | 47 | | |
41 | 48 | | |
42 | 49 | | |
43 | 50 | | |
44 | | - | |
45 | | - | |
46 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
47 | 56 | | |
48 | 57 | | |
49 | 58 | | |
| |||
83 | 92 | | |
84 | 93 | | |
85 | 94 | | |
86 | | - | |
| 95 | + | |
0 commit comments