diff options
| author | thecharlesblake | 2018-01-05 18:03:44 +0000 |
|---|---|---|
| committer | thecharlesblake | 2018-01-05 18:03:44 +0000 |
| commit | 33a078a933481fe14acabf2c3c2cd97288df6cb3 (patch) | |
| tree | a848fc3c13880b85c05772d53aa1b9dcc98a34db /benchmark.py | |
| parent | Add diagonal deal to game setup (somerset) (diff) | |
| download | metasol-33a078a933481fe14acabf2c3c2cd97288df6cb3.tar.gz metasol-33a078a933481fe14acabf2c3c2cd97288df6cb3.zip | |
Add somerset to benchmark script
Diffstat (limited to 'benchmark.py')
| -rw-r--r-- | benchmark.py | 13 |
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): |
