aboutsummaryrefslogtreecommitdiff
path: root/benchmark.py
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark.py')
-rw-r--r--benchmark.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/benchmark.py b/benchmark.py
index 52d426f..664271a 100644
--- a/benchmark.py
+++ b/benchmark.py
@@ -87,7 +87,6 @@ class FlowerGardenRulesGen(SolitaireRulesGen):
self.baseJson["tableau piles"]["count"] = math.ceil(6*level/13)
self.baseJson["reserve size"] = math.ceil(16*level/13)
-
class CanfieldRulesGen(SolitaireRulesGen):
def __init__(self):
@@ -101,6 +100,15 @@ class CanfieldRulesGen(SolitaireRulesGen):
self.baseJson["reserve size"] = reserveSize
self.baseJson["stock size"] = stockSize
+class SomersetRulesGen(SolitaireRulesGen):
+
+ def __init__(self):
+ super().__init__("somerset")
+
+ def alterFieldsToChange(self, level):
+ self.baseJson["max rank"] = level
+ self.baseJson["tableau piles"]["count"] = math.ceil(10*level/13)
+
def cleanup():
os.remove(tempRulesFilename)
run("pkill solvitaire", shell=True)
@@ -114,7 +122,8 @@ for rulesGen in [SpanishPatienceRulesGen(),
BakersDozenRulesGen(),
FortunesFavorRulesGen(),
FlowerGardenRulesGen(),
- CanfieldRulesGen()]:
+ CanfieldRulesGen(),
+ SomersetRulesGen()]:
# Loops through the levels
for level in range(1, 14):