diff options
| -rwxr-xr-x | generate-results.sh | 28 | ||||
| -rw-r--r-- | src/main/game/search-state/game_state.cpp | 3 | ||||
| -rw-r--r-- | src/main/game/search-state/game_state.legal_moves.cpp | 3 | ||||
| -rw-r--r-- | src/main/game/sol_rules.cpp | 6 | ||||
| -rw-r--r-- | src/main/game/sol_rules.h | 14 | ||||
| -rw-r--r-- | src/main/input-output/input/json-parsing/deal_parser.cpp | 3 | ||||
| -rw-r--r-- | src/main/input-output/input/json-parsing/rules_parser.cpp | 37 | ||||
| -rw-r--r-- | src/main/input-output/input/sol_preset_types.cpp | 62 | ||||
| -rw-r--r-- | src/test/unit_tests/built_group_move_gen_test.cpp | 19 | ||||
| -rw-r--r-- | src/test/unit_tests/face_up_cards_test.cpp | 23 | ||||
| -rw-r--r-- | src/test/unit_tests/legal_move_gen_test.cpp | 5 |
11 files changed, 122 insertions, 81 deletions
diff --git a/generate-results.sh b/generate-results.sh index 83d637d..cf41873 100755 --- a/generate-results.sh +++ b/generate-results.sh @@ -31,31 +31,31 @@ declare -a arr=( "free-cell-6-pile" "free-cell-7-pile" "free-cell" +"blind-alleys" +"chameleon" +"duchess" +"east-haven" +"klondike" +"klondike-deal-1" +"martha" +"canfield" +"penguin" +"alina" +"bakers-dozen" +"scotch-patience" +"spider" ) ### Presets not attempted: ## Rules incorrect -#"martha" -#"canfield" -#"penguin" ## Too difficult (?) -#"alina" -#"bakers-dozen" -#"scotch-patience" -#"spider" ## Stock games -#"blind-alleys" (medium) -#"chameleon" (hard) -#"duchess" (hard) -#"east-haven" (easy) -#"klondike" (medium) -#"klondike-deal-1" (medium) DATE=`date +%Y-%m-%d-%H-%M-%S` @@ -65,7 +65,7 @@ mkdir -p results/$DATE for i in "${arr[@]}" do echo "Running $i ..." - ./sol --type "$i" --solvability 10000 --time 600000 --cores 25 --stream > results/$DATE/$i.csv + sol --type "$i" --solvability 20 --time 60 --stream none > results/$DATE/$i.csv done echo "Done!" diff --git a/src/main/game/search-state/game_state.cpp b/src/main/game/search-state/game_state.cpp index 0388d9c..10c8e20 100644 --- a/src/main/game/search-state/game_state.cpp +++ b/src/main/game/search-state/game_state.cpp @@ -38,6 +38,7 @@ typedef sol_rules::build_policy pol; typedef sol_rules::stock_deal_type sdt; typedef sol_rules::face_up_policy fu; typedef game_state::streamliner_options sos; +typedef sol_rules::foundations_init_type fit; ////////////////// // CONSTRUCTORS // @@ -139,7 +140,7 @@ game_state::game_state(const sol_rules& s_rules, int seed, streamliner_options s } // If the foundations begin filled, then fills them - if (rules.foundations_init_card) { + if (rules.foundations_init_cards == fit::ALL) { for (uint8_t f_idx = 0; f_idx < 4*(rules.two_decks ? 2:1); f_idx++) { card c = card(f_idx % uint8_t(4), 1); diff --git a/src/main/game/search-state/game_state.legal_moves.cpp b/src/main/game/search-state/game_state.legal_moves.cpp index e1cbc8e..99a37d6 100644 --- a/src/main/game/search-state/game_state.legal_moves.cpp +++ b/src/main/game/search-state/game_state.legal_moves.cpp @@ -22,6 +22,7 @@ typedef sol_rules::accordion_policy acc_pol; typedef sol_rules::stock_deal_type sdt; typedef sol_rules::face_up_policy fu; typedef sol_rules::direction dir; +typedef sol_rules::built_group_type bgt; //////////////////////////////// // MAIN LEGAL MOVE GEN CYCLE /// @@ -97,7 +98,7 @@ vector<move> game_state::get_legal_moves(move parent_move) { if (rules.stock_size > 0 && rules.stock_deal_t == sdt::WASTE && !piles[stock].empty()) add_stock_to_tableau_moves(moves); - if (rules.move_built_group) + if (rules.move_built_group != bgt::NO) add_built_group_moves(moves); // Tableau to tableau moves diff --git a/src/main/game/sol_rules.cpp b/src/main/game/sol_rules.cpp index 0ea998e..d19d0b8 100644 --- a/src/main/game/sol_rules.cpp +++ b/src/main/game/sol_rules.cpp @@ -9,6 +9,8 @@ typedef sol_rules::spaces_policy s_pol; typedef sol_rules::stock_deal_type sdt; typedef sol_rules::direction dir; typedef sol_rules::face_up_policy fu; +typedef sol_rules::built_group_type bgt; +typedef sol_rules::foundations_init_type fit; // Note that the 'default' sol rules are set up by parsing the default json // rules description. This initialisation is really just for testing purposes. @@ -16,13 +18,13 @@ sol_rules::sol_rules() : tableau_pile_count(0), build_pol(pol::ANY_SUIT), spaces_pol(s_pol::ANY), - move_built_group(false), + move_built_group(bgt::NO), built_group_pol(pol::ANY_SUIT), two_decks(false), max_rank(13), hole(false), foundations_present(false), - foundations_init_card(false), + foundations_init_cards(fit::NONE), foundations_only_comp_piles(false), diagonal_deal(false), cells(0), diff --git a/src/main/game/sol_rules.h b/src/main/game/sol_rules.h index 0673771..25dcbe4 100644 --- a/src/main/game/sol_rules.h +++ b/src/main/game/sol_rules.h @@ -44,17 +44,27 @@ struct sol_rules { RIGHT, BOTH }; + enum class built_group_type { + YES, + NO, + WHOLE_PILE + }; + enum class foundations_init_type { + NONE, + ONE, + ALL + }; uint8_t tableau_pile_count; build_policy build_pol; spaces_policy spaces_pol; - bool move_built_group; + built_group_type move_built_group; build_policy built_group_pol; bool two_decks; uint8_t max_rank; bool hole; bool foundations_present; - bool foundations_init_card; + foundations_init_type foundations_init_cards; bool foundations_removable; bool foundations_only_comp_piles; bool diagonal_deal; diff --git a/src/main/input-output/input/json-parsing/deal_parser.cpp b/src/main/input-output/input/json-parsing/deal_parser.cpp index 7b8cf18..7531cec 100644 --- a/src/main/input-output/input/json-parsing/deal_parser.cpp +++ b/src/main/input-output/input/json-parsing/deal_parser.cpp @@ -13,6 +13,7 @@ using namespace rapidjson; typedef sol_rules::build_policy pol; typedef sol_rules::stock_deal_type sdt; typedef sol_rules::face_up_policy fu; +typedef sol_rules::foundations_init_type fit; void deal_parser::parse(game_state &gs, const rapidjson::Document& doc) { // There are two stages to reading in the supplied deal. It is both put @@ -65,7 +66,7 @@ void deal_parser::parse(game_state &gs, const rapidjson::Document& doc) { if (gs.rules.foundations_present) { bool supplied_foundations = parse_foundations(gs, doc); - if (!supplied_foundations && gs.rules.foundations_init_card) { + if (!supplied_foundations && gs.rules.foundations_init_cards == fit::ALL) { fill_foundations(gs); } } diff --git a/src/main/input-output/input/json-parsing/rules_parser.cpp b/src/main/input-output/input/json-parsing/rules_parser.cpp index f7de6d8..4e0634f 100644 --- a/src/main/input-output/input/json-parsing/rules_parser.cpp +++ b/src/main/input-output/input/json-parsing/rules_parser.cpp @@ -24,6 +24,8 @@ typedef sol_rules::accordion_policy acc_pol; typedef sol_rules::stock_deal_type sdt; typedef sol_rules::face_up_policy fu; typedef sol_rules::direction dir; +typedef sol_rules::built_group_type bgt; +typedef sol_rules::foundations_init_type fit; const sol_rules rules_parser::from_file(const string rules_file) { sol_rules sr = get_default(); @@ -125,10 +127,20 @@ void rules_parser::modify_sol_rules(sol_rules& sr, Document& d) { } if (d["tableau piles"].HasMember("move built group")) { - if (d["tableau piles"]["move built group"].IsBool()) { - sr.move_built_group = d["tableau piles"]["move built group"].GetBool(); + if (d["tableau piles"]["move built group"].IsString()) { + string mbg_str = d["tableau piles"]["move built group"].GetString(); + + if (mbg_str == "yes") { + sr.move_built_group = bgt::YES; + } else if (mbg_str == "no") { + sr.move_built_group = bgt::NO; + } else if (mbg_str == "whole-pile") { + sr.move_built_group = bgt::WHOLE_PILE; + } else { + json_helper::json_parse_err("[tableau piles][move built group] is invalid"); + } } else { - json_helper::json_parse_err("[tableau piles][move built group] must be a boolean"); + json_helper::json_parse_err("[tableau piles][move built group] must be a string"); } } @@ -198,11 +210,22 @@ void rules_parser::modify_sol_rules(sol_rules& sr, Document& d) { } } - if (d["foundations"].HasMember("initial card")) { - if (d["foundations"]["initial card"].IsBool()) { - sr.foundations_init_card = d["foundations"]["initial card"].GetBool(); + if (d["foundations"].HasMember("initial cards")) { + if (d["foundations"]["initial cards"].IsString()) { + string ic_str = d["foundations"]["initial cards"].GetString(); + + if (ic_str == "none") { + sr.foundations_init_cards = fit::NONE; + } else if (ic_str == "one") { + sr.foundations_init_cards = fit::ONE; + } else if (ic_str == "all") { + sr.foundations_init_cards = fit::ALL; + } else { + string err = "[foundations][initial cards] is invalid: " + ic_str; + json_helper::json_parse_err(err); + } } else { - json_helper::json_parse_err("[foundations][initial card] must be a boolean"); + json_helper::json_parse_err("[foundations][initial cards] must be a string"); } } diff --git a/src/main/input-output/input/sol_preset_types.cpp b/src/main/input-output/input/sol_preset_types.cpp index 65100e0..85edcd3 100644 --- a/src/main/input-output/input/sol_preset_types.cpp +++ b/src/main/input-output/input/sol_preset_types.cpp @@ -202,7 +202,7 @@ map<string, string> sol_preset_types::mp = { "build policy": "same-suit" }, "foundations": { - "initial card": true + "initial cards": "all" }, "stock": { "size": 36 @@ -221,7 +221,7 @@ map<string, string> sol_preset_types::mp = { "build policy": "same-suit" }, "foundations": { - "initial card": true + "initial cards": "all" }, "stock": { "size": 3 @@ -276,7 +276,7 @@ map<string, string> sol_preset_types::mp = { "tableau piles": { "count": 4, "build policy": "red-black", - "move built group": true + "move built group": "yes" }, "stock": { "size": 34 @@ -297,7 +297,7 @@ map<string, string> sol_preset_types::mp = { "tableau piles": { "count": 3, "build policy": "red-black", - "move built group": true + "move built group": "yes" }, "stock": { "size": 1 @@ -354,10 +354,10 @@ map<string, string> sol_preset_types::mp = { "tableau piles": { "count": 12, "build policy": "same-suit", - "move built group": true + "move built group": "yes" }, "foundations": { - "initial card": true + "initial cards": "all" } } )" @@ -371,10 +371,10 @@ map<string, string> sol_preset_types::mp = { "tableau piles": { "count": 3, "build policy": "same-suit", - "move built group": true + "move built group": "yes" }, "foundations": { - "initial card": true + "initial cards": "all" }, "max rank": 6 } @@ -389,7 +389,7 @@ map<string, string> sol_preset_types::mp = { "tableau piles": { "count": 10, "build policy": "any-suit", - "move built group": true, + "move built group": "yes", "move built group policy": "same-suit" }, "foundations": { @@ -412,7 +412,7 @@ map<string, string> sol_preset_types::mp = { "tableau piles": { "count": 4, "build policy": "any-suit", - "move built group": true, + "move built group": "yes", "move built group policy": "same-suit" }, "foundations": { @@ -437,7 +437,7 @@ map<string, string> sol_preset_types::mp = { "tableau piles": { "count": 4, "build policy": "red-black", - "move built group": true, + "move built group": "yes", "diagonal deal": true, "face up cards": "top" }, @@ -467,7 +467,7 @@ map<string, string> sol_preset_types::mp = { }, "foundations": { "removable": true, - "initial card": true + "initial cards": "all" } } )" @@ -483,7 +483,7 @@ map<string, string> sol_preset_types::mp = { "count": 7, "build policy": "red-black", "spaces policy": "kings", - "move built group": true, + "move built group": "yes", "diagonal deal": true, "face up cards": "top" }, @@ -509,7 +509,7 @@ map<string, string> sol_preset_types::mp = { "count": 7, "build policy": "red-black", "spaces policy": "kings", - "move built group": true, + "move built group": "yes", "diagonal deal": true, "face up cards": "top" }, @@ -569,7 +569,7 @@ map<string, string> sol_preset_types::mp = { "build policy": "same-suit" }, "foundations": { - "initial card": true + "initial cards": "all" } } )" @@ -585,7 +585,7 @@ map<string, string> sol_preset_types::mp = { "build policy": "red-black" }, "foundations": { - "initial card": true, + "initial cards": "all", "removable": true } } @@ -602,7 +602,7 @@ map<string, string> sol_preset_types::mp = { "build policy": "red-black" }, "foundations": { - "initial card": true, + "initial cards": "all", "removable": true }, "cells": 1 @@ -620,7 +620,7 @@ map<string, string> sol_preset_types::mp = { "build policy": "red-black" }, "foundations": { - "initial card": true, + "initial cards": "all", "removable": true }, "cells": 2 @@ -798,12 +798,12 @@ map<string, string> sol_preset_types::mp = { "tableau piles": { "count": 7, "build policy": "same-suit", - "move built group": true, + "move built group": "yes", "spaces policy": "kings" }, "cells": 7, "foundations": { - "initial card": true + "initial cards": "all" } } )" @@ -817,7 +817,7 @@ map<string, string> sol_preset_types::mp = { "tableau piles": { "count": 10, "build policy": "same-suit", - "move built group": true, + "move built group": "yes", "spaces policy": "kings" }, "cells": 4 @@ -833,10 +833,10 @@ map<string, string> sol_preset_types::mp = { "tableau piles": { "count": 4, "build policy": "red-black", - "move built group": true + "move built group": "yes" }, "foundations": { - "initial card": true + "initial cards": "all" }, "reserve": { "size": 12 @@ -856,7 +856,7 @@ map<string, string> sol_preset_types::mp = { "tableau piles": { "count": 3, "build policy": "any-suit", - "move built group": true + "move built group": "yes" }, "reserve": { "size": 13, @@ -911,10 +911,10 @@ map<string, string> sol_preset_types::mp = { "tableau piles": { "count": 6, "build policy": "red-black", - "move built group": true + "move built group": "yes" }, "foundations": { - "initial card": true, + "initial cards": "all", "removable": true }, "stock": { @@ -932,7 +932,7 @@ map<string, string> sol_preset_types::mp = { "tableau piles": { "count": 7, "build policy": "red-black", - "move built group": true, + "move built group": "yes", "face up cards": "top" }, "foundations": { @@ -953,7 +953,7 @@ map<string, string> sol_preset_types::mp = { { "tableau piles": { "build policy": "red-black", - "move built group": true, + "move built group": "yes", "spaces policy": "kings", "diagonal deal": true }, @@ -995,7 +995,7 @@ map<string, string> sol_preset_types::mp = { "tableau piles": { "count": 7, "build policy": "any-suit", - "move built group": true, + "move built group": "yes", "move built group policy": "same-suit", "diagonal deal": true }, @@ -1018,7 +1018,7 @@ map<string, string> sol_preset_types::mp = { "tableau piles": { "count": 7, "build policy": "any-suit", - "move built group": true, + "move built group": "yes", "move built group policy": "same-suit" }, "foundations": { @@ -1040,7 +1040,7 @@ map<string, string> sol_preset_types::mp = { "tableau piles": { "count": 10, "diagonal deal": true, - "move built group": true, + "move built group": "yes", "move built group policy": "same-suit" }, "foundations": { diff --git a/src/test/unit_tests/built_group_move_gen_test.cpp b/src/test/unit_tests/built_group_move_gen_test.cpp index 7bc7f46..b16a874 100644 --- a/src/test/unit_tests/built_group_move_gen_test.cpp +++ b/src/test/unit_tests/built_group_move_gen_test.cpp @@ -10,6 +10,7 @@ typedef sol_rules::build_policy pol; typedef sol_rules::spaces_policy s_pol; +typedef sol_rules::built_group_type bgt; using std::vector; using std::ostream; @@ -19,7 +20,7 @@ TEST(BuiltGroupMoveGen, SameSuitEmpty) { sol_rules sr; sr.tableau_pile_count = 5; sr.built_group_pol = pol::SAME_SUIT; - sr.move_built_group = true; + sr.move_built_group = bgt::YES; test_helper::expected_moves_test( sr, @@ -52,7 +53,7 @@ TEST(BuiltGroupMoveGen, RedBlackEmpty) { sol_rules sr; sr.tableau_pile_count = 5; sr.built_group_pol = pol::RED_BLACK; - sr.move_built_group = true; + sr.move_built_group = bgt::YES; test_helper::expected_moves_test( sr, @@ -88,7 +89,7 @@ TEST(BuiltGroupMoveGen, AnySuitEmpty) { sol_rules sr; sr.tableau_pile_count = 5; sr.built_group_pol = pol::ANY_SUIT; - sr.move_built_group = true; + sr.move_built_group = bgt::YES; test_helper::expected_moves_test( sr, @@ -131,7 +132,7 @@ TEST(BuiltGroupMoveGen, CantMove) { sol_rules sr; sr.tableau_pile_count = 5; sr.built_group_pol = pol::ANY_SUIT; - sr.move_built_group = false; + sr.move_built_group = bgt::NO; test_helper::expected_moves_test( sr, @@ -159,7 +160,7 @@ TEST(BuiltGroupMoveGen, SameSuitOccupied) { sr.tableau_pile_count = 6; sr.build_pol = pol::SAME_SUIT; sr.built_group_pol = pol::SAME_SUIT; - sr.move_built_group = true; + sr.move_built_group = bgt::YES; test_helper::expected_moves_test( sr, @@ -194,7 +195,7 @@ TEST(BuiltGroupMoveGen, RedBlackOccupied) { sr.tableau_pile_count = 6; sr.build_pol = pol::RED_BLACK; sr.built_group_pol = pol::RED_BLACK; - sr.move_built_group = true; + sr.move_built_group = bgt::YES; test_helper::expected_moves_test( sr, @@ -229,7 +230,7 @@ TEST(BuiltGroupMoveGen, AnySuitOccupied) { sr.tableau_pile_count = 6; sr.build_pol = pol::ANY_SUIT; sr.built_group_pol = pol::ANY_SUIT; - sr.move_built_group = true; + sr.move_built_group = bgt::YES; test_helper::expected_moves_test( sr, @@ -276,7 +277,7 @@ TEST(BuiltGroupMoveGen, KingsOnly) { sr.tableau_pile_count = 5; sr.build_pol = pol::SAME_SUIT; sr.built_group_pol = pol::RED_BLACK; - sr.move_built_group = true; + sr.move_built_group = bgt::YES; sr.spaces_pol = s_pol::KINGS; test_helper::expected_moves_test( @@ -301,7 +302,7 @@ TEST(BuiltGroupMoveGen, NoBuild) { sr.tableau_pile_count = 5; sr.build_pol = pol::SAME_SUIT; sr.built_group_pol = pol::RED_BLACK; - sr.move_built_group = true; + sr.move_built_group = bgt::YES; sr.spaces_pol = s_pol::NO_BUILD; test_helper::expected_moves_test( diff --git a/src/test/unit_tests/face_up_cards_test.cpp b/src/test/unit_tests/face_up_cards_test.cpp index 5bf65cb..eb828a0 100644 --- a/src/test/unit_tests/face_up_cards_test.cpp +++ b/src/test/unit_tests/face_up_cards_test.cpp @@ -12,6 +12,7 @@ typedef sol_rules::build_policy pol; typedef sol_rules::face_up_policy fu; typedef move::mtype mt; +typedef sol_rules::built_group_type bgt; using std::vector; using std::ostream; @@ -27,7 +28,7 @@ TEST(FaceUpCards, CapsFaceUpIfFaceUpNotAll) { sr.tableau_pile_count = 3; sr.built_group_pol = pol::SAME_SUIT; sr.build_pol = pol::SAME_SUIT; - sr.move_built_group = true; + sr.move_built_group = bgt::YES; sr.face_up = fu::TOP_CARDS; string_il piles = { @@ -48,7 +49,7 @@ TEST(FaceUpCards, IgnoreCapsIfFaceUpAll) { sr.tableau_pile_count = 3; sr.built_group_pol = pol::SAME_SUIT; sr.build_pol = pol::SAME_SUIT; - sr.move_built_group = true; + sr.move_built_group = bgt::YES; sr.face_up = fu::ALL; string_il piles = { @@ -69,7 +70,7 @@ TEST(FaceUpCards, MoveTurnsFaceUp) { sr.tableau_pile_count = 3; sr.built_group_pol = pol::SAME_SUIT; sr.build_pol = pol::SAME_SUIT; - sr.move_built_group = true; + sr.move_built_group = bgt::YES; sr.face_up = fu::TOP_CARDS; string_il piles = { @@ -101,7 +102,7 @@ TEST(FaceUpCards, BuiltGroupMoveTurnsFaceUp) { sr.tableau_pile_count = 2; sr.built_group_pol = pol::SAME_SUIT; sr.build_pol = pol::SAME_SUIT; - sr.move_built_group = true; + sr.move_built_group = bgt::YES; sr.face_up = fu::TOP_CARDS; string_il piles = { @@ -133,7 +134,7 @@ TEST(FaceUpCards, MoveAlreadyFaceUpNoChange) { sr.tableau_pile_count = 3; sr.built_group_pol = pol::SAME_SUIT; sr.build_pol = pol::SAME_SUIT; - sr.move_built_group = true; + sr.move_built_group = bgt::YES; sr.face_up = fu::TOP_CARDS; string_il piles = { @@ -165,7 +166,7 @@ TEST(FaceUpCards, FaceDownNoBuiltGroup) { sr.tableau_pile_count = 3; sr.built_group_pol = pol::SAME_SUIT; sr.build_pol = pol::SAME_SUIT; - sr.move_built_group = true; + sr.move_built_group = bgt::YES; sr.face_up = fu::TOP_CARDS; test_helper::expected_moves_test( @@ -188,7 +189,7 @@ TEST(FaceUpCards, FaceUpBuiltGroup) { sr.tableau_pile_count = 3; sr.built_group_pol = pol::SAME_SUIT; sr.build_pol = pol::SAME_SUIT; - sr.move_built_group = true; + sr.move_built_group = bgt::YES; sr.face_up = fu::TOP_CARDS; test_helper::expected_moves_test( @@ -215,7 +216,7 @@ TEST(FaceUpCards, FaceUpBuiltGroup2Not3) { sr.tableau_pile_count = 3; sr.built_group_pol = pol::SAME_SUIT; sr.build_pol = pol::SAME_SUIT; - sr.move_built_group = true; + sr.move_built_group = bgt::YES; sr.face_up = fu::TOP_CARDS; test_helper::expected_moves_test( @@ -241,7 +242,7 @@ TEST(FaceUpCards, UndoTurnsBackFaceDown) { sr.tableau_pile_count = 3; sr.built_group_pol = pol::SAME_SUIT; sr.build_pol = pol::SAME_SUIT; - sr.move_built_group = true; + sr.move_built_group = bgt::YES; sr.face_up = fu::TOP_CARDS; string_il piles = { @@ -265,7 +266,7 @@ TEST(FaceUpCards, UndoBuiltGroupTurnsBackFaceDown) { sr.tableau_pile_count = 3; sr.built_group_pol = pol::SAME_SUIT; sr.build_pol = pol::SAME_SUIT; - sr.move_built_group = true; + sr.move_built_group = bgt::YES; sr.face_up = fu::TOP_CARDS; string_il piles = { @@ -290,7 +291,7 @@ TEST(FaceUpCards, CacheEncodesFaceDown) { sr.tableau_pile_count = 3; sr.built_group_pol = pol::RED_BLACK; sr.build_pol = pol::RED_BLACK; - sr.move_built_group = true; + sr.move_built_group = bgt::YES; sr.face_up = fu::TOP_CARDS; string_il piles = { diff --git a/src/test/unit_tests/legal_move_gen_test.cpp b/src/test/unit_tests/legal_move_gen_test.cpp index 4625163..a948bba 100644 --- a/src/test/unit_tests/legal_move_gen_test.cpp +++ b/src/test/unit_tests/legal_move_gen_test.cpp @@ -12,6 +12,7 @@ typedef sol_rules::build_policy pol; typedef sol_rules::spaces_policy s_pol; typedef sol_rules::stock_deal_type sdt; +typedef sol_rules::built_group_type bgt; using std::vector; using std::ostream; @@ -162,7 +163,7 @@ TEST(LegalMoveGen, SpacesPolNoBuild) { TEST(LegalMoveGen, MoveBuiltGroupTrue) { sol_rules sr; - sr.move_built_group = true; + sr.move_built_group = bgt::YES; sr.tableau_pile_count = 2; game_state gs(sr, string_il{ @@ -181,7 +182,7 @@ TEST(LegalMoveGen, MoveBuiltGroupTrue) { TEST(LegalMoveGen, MoveBuiltGroupFalse) { sol_rules sr; - sr.move_built_group = false; + sr.move_built_group = bgt::NO; sr.tableau_pile_count = 2; game_state gs(sr, string_il{ |
