aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthecharlesblake2018-01-09 08:56:41 +0000
committerthecharlesblake2018-01-09 08:56:41 +0000
commit05f13cad2a23ab7b97f7cd903867097a67e96ad8 (patch)
tree5ad08a4621dbc118480553d53666e3e507ce584e
parentAdd logic for stock-tableau deal & 2 deck (diff)
downloadmetasol-05f13cad2a23ab7b97f7cd903867097a67e96ad8.tar.gz
metasol-05f13cad2a23ab7b97f7cd903867097a67e96ad8.zip

Add spider to benchmark script

-rw-r--r--benchmark.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/benchmark.py b/benchmark.py
index e8133b1..c00ccce 100644
--- a/benchmark.py
+++ b/benchmark.py
@@ -118,6 +118,16 @@ class AlphaStarRulesGen(SolitaireRulesGen):
self.baseJson["max rank"] = level
self.baseJson["tableau piles"]["count"] = math.ceil(12*level/13)
+class SpiderRulesGen(SolitaireRulesGen):
+
+ def __init__(self):
+ super().__init__("spider")
+
+ def alterFieldsToChange(self, level):
+ self.baseJson["max rank"] = level
+ self.baseJson["tableau piles"]["count"] = math.ceil(10*level/13)
+ self.baseJson["stock size"] = math.ceil(60*level/13)
+
def cleanup():
os.remove(tempRulesFilename)
run("pkill solvitaire", shell=True)
@@ -133,7 +143,8 @@ for rulesGen in [SpanishPatienceRulesGen(),
FlowerGardenRulesGen(),
CanfieldRulesGen(),
SomersetRulesGen(),
- AlphaStarRulesGen()]:
+ AlphaStarRulesGen(),
+ SpiderRulesGen()]:
# Loops through the levels
for level in range(1, 14):