aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/evaluation/benchmark.cpp2
-rw-r--r--src/main/game/game_state.cpp6
-rw-r--r--src/main/input-output/input/sol_preset_types.cpp20
3 files changed, 20 insertions, 8 deletions
diff --git a/src/main/evaluation/benchmark.cpp b/src/main/evaluation/benchmark.cpp
index 74d34a3..f25e491 100644
--- a/src/main/evaluation/benchmark.cpp
+++ b/src/main/evaluation/benchmark.cpp
@@ -27,7 +27,7 @@ void benchmark::run(const sol_rules &rules) {
int total_solvable = 0;
int total_unsolvable = 0;
- for(int seed = 1; seed < INT_MAX; seed++) {
+ for(int seed = 1; seed <= 1000; seed++) {
game_state gs(rules, seed);
solver sol(gs);
diff --git a/src/main/game/game_state.cpp b/src/main/game/game_state.cpp
index 9c32b4f..58f5f68 100644
--- a/src/main/game/game_state.cpp
+++ b/src/main/game/game_state.cpp
@@ -368,17 +368,17 @@ card game_state::take_card(pile_ref pr) {
void game_state::eval_pile_order(pile_ref pr, bool is_place) {
if (!original_tableau_piles.empty()
&& pr >= original_tableau_piles[0]
- && pr <= original_tableau_piles[0] + original_tableau_piles.size()) {
+ && pr < original_tableau_piles[0] + original_tableau_piles.size()) {
eval_pile_order(tableau_piles, pr, is_place);
} else if (!original_cells.empty()
&& pr >= original_cells[0]
- && pr <= original_cells[0] + original_cells.size()) {
+ && pr < original_cells[0] + original_cells.size()) {
eval_pile_order(cells, pr, is_place);
} else if (!original_reserve.empty()
&& pr >= original_reserve[0]
- && pr <= original_reserve[0] + original_reserve.size()) {
+ && pr < original_reserve[0] + original_reserve.size()) {
eval_pile_order(reserve, pr, is_place);
}
diff --git a/src/main/input-output/input/sol_preset_types.cpp b/src/main/input-output/input/sol_preset_types.cpp
index 4afc86f..0f2dd67 100644
--- a/src/main/input-output/input/sol_preset_types.cpp
+++ b/src/main/input-output/input/sol_preset_types.cpp
@@ -555,7 +555,7 @@ map<string, string> sol_preset_types::mp = {
"tableau piles": {
"build policy": "red-black"
},
- "cells": 1
+ "cells": 0
}
)"
@@ -603,14 +603,26 @@ map<string, string> sol_preset_types::mp = {
},
{
+ "free-cell-4-pile",
+
+ R"(
+{
+ "tableau piles": {
+ "count": 4,
+ "build policy": "red-black"
+ },
+ "cells": 4
+}
+)"
+
+ },
+ {
"bakers-game",
R"(
{
"tableau piles": {
- "build policy": "same-suit",
- "move built group": true,
- "spaces policy": "kings"
+ "build policy": "same-suit"
},
"cells": 4
}