aboutsummaryrefslogtreecommitdiff
path: root/benchmark.py
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark.py')
-rw-r--r--benchmark.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/benchmark.py b/benchmark.py
index 664271a..e8133b1 100644
--- a/benchmark.py
+++ b/benchmark.py
@@ -109,6 +109,15 @@ class SomersetRulesGen(SolitaireRulesGen):
self.baseJson["max rank"] = level
self.baseJson["tableau piles"]["count"] = math.ceil(10*level/13)
+class AlphaStarRulesGen(SolitaireRulesGen):
+
+ def __init__(self):
+ super().__init__("alpha-star")
+
+ def alterFieldsToChange(self, level):
+ self.baseJson["max rank"] = level
+ self.baseJson["tableau piles"]["count"] = math.ceil(12*level/13)
+
def cleanup():
os.remove(tempRulesFilename)
run("pkill solvitaire", shell=True)
@@ -123,7 +132,8 @@ for rulesGen in [SpanishPatienceRulesGen(),
FortunesFavorRulesGen(),
FlowerGardenRulesGen(),
CanfieldRulesGen(),
- SomersetRulesGen()]:
+ SomersetRulesGen(),
+ AlphaStarRulesGen()]:
# Loops through the levels
for level in range(1, 14):