aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthecharlesblake2018-01-08 19:06:29 +0000
committerthecharlesblake2018-01-08 19:06:29 +0000
commit6de44c569de4d2e5698c1b27d59064b5e7625bcf (patch)
tree657bf86a6cec083c2e2c891fe7361ea90fb7a46a
parentAdd game logic for built pile (AA) and refactor (diff)
downloadmetasol-6de44c569de4d2e5698c1b27d59064b5e7625bcf.tar.gz
metasol-6de44c569de4d2e5698c1b27d59064b5e7625bcf.zip

Add alpha star to benchmark script

-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):