From 28c5a79425fa12f9466e27385404f429f76f7524 Mon Sep 17 00:00:00 2001 From: Charlie Blake Date: Thu, 19 Jul 2018 11:06:38 +0100 Subject: Update rules so new schema works w/ existing games --- src/test/unit_tests/built_group_move_gen_test.cpp | 19 ++++++++++--------- src/test/unit_tests/face_up_cards_test.cpp | 23 ++++++++++++----------- src/test/unit_tests/legal_move_gen_test.cpp | 5 +++-- 3 files changed, 25 insertions(+), 22 deletions(-) (limited to 'src/test') 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{ -- cgit v1.2.1 From d0b797e8fdb86337085d223d42ea116b1ae8ef12 Mon Sep 17 00:00:00 2001 From: Charlie Blake Date: Thu, 19 Jul 2018 14:18:19 +0100 Subject: Add canfield unit tests --- src/test/resources/canfield/ComplexSolvable.json | 11 ++++++----- src/test/resources/canfield/ComplexUnsolvable.json | 11 ++++++----- src/test/resources/canfield/SimpleSolvable.json | 13 +++++++------ src/test/resources/canfield/SimpleUnsolvable.json | 11 ++++++----- 4 files changed, 25 insertions(+), 21 deletions(-) (limited to 'src/test') diff --git a/src/test/resources/canfield/ComplexSolvable.json b/src/test/resources/canfield/ComplexSolvable.json index b5c9253..7abae7a 100644 --- a/src/test/resources/canfield/ComplexSolvable.json +++ b/src/test/resources/canfield/ComplexSolvable.json @@ -1,9 +1,10 @@ { + "foundations": ["2C"], "tableau piles": [ - ["AC","2C","3C"], - ["AD","2D","3D"], - ["3S","AS","3H"] + ["AS"], + ["AC"], + ["3D"] ], - "stock": ["2H"], - "reserve": ["AH","2S"] + "stock": ["2H","3S"], + "reserve": ["AH","2S","3H","AD","3C","2D"] } \ No newline at end of file diff --git a/src/test/resources/canfield/ComplexUnsolvable.json b/src/test/resources/canfield/ComplexUnsolvable.json index 9391caf..3869722 100644 --- a/src/test/resources/canfield/ComplexUnsolvable.json +++ b/src/test/resources/canfield/ComplexUnsolvable.json @@ -1,9 +1,10 @@ { + "foundations": ["2S","2C"], "tableau piles": [ - ["AC","2H","2D"], - ["AD","3D","3C"], - ["2S","AS","3H"] + ["AS"], + ["AC"], + ["3D"] ], - "stock": ["2C"], - "reserve": ["AH","3S"] + "stock": ["AH"], + "reserve": ["3H","2H","3S","AD","3C","2D"] } \ No newline at end of file diff --git a/src/test/resources/canfield/SimpleSolvable.json b/src/test/resources/canfield/SimpleSolvable.json index 4e998ea..450f5bd 100644 --- a/src/test/resources/canfield/SimpleSolvable.json +++ b/src/test/resources/canfield/SimpleSolvable.json @@ -1,9 +1,10 @@ { + "foundations": ["2C"], "tableau piles": [ - ["3C","2C","AC"], - ["3D","2D","AD"], - ["3H","3S","AH"] + ["2S"], + ["AC"], + ["3D"] ], - "stock": ["2H"], - "reserve": ["2S","AS"] -} + "stock": ["AH","3S"], + "reserve": ["2H","AS","3H","2D","3C","AD"] +} \ No newline at end of file diff --git a/src/test/resources/canfield/SimpleUnsolvable.json b/src/test/resources/canfield/SimpleUnsolvable.json index e8a1e3e..aefa7b8 100644 --- a/src/test/resources/canfield/SimpleUnsolvable.json +++ b/src/test/resources/canfield/SimpleUnsolvable.json @@ -1,9 +1,10 @@ { + "foundations": ["2C"], "tableau piles": [ - ["AC","2C","3C"], - ["AD","2D","3D"], - ["AH","AS","3H"] + ["AS"], + ["AC"], + ["AD"] ], - "stock": ["2H"], - "reserve": ["2S","3S"] + "stock": ["2S","3D"], + "reserve": ["3H","2H","AH","3S","3C","2D"] } \ No newline at end of file -- cgit v1.2.1 From 12e8d1f342303394f8e6be72c08a92e3a4097bfb Mon Sep 17 00:00:00 2001 From: Charlie Blake Date: Thu, 19 Jul 2018 15:45:14 +0100 Subject: Add Canfield unit tests --- src/test/integration_tests/canfield_test.cpp | 102 +++++++++++++++++++++++++++ src/test/test_helper.cpp | 8 +++ src/test/test_helper.h | 2 + 3 files changed, 112 insertions(+) (limited to 'src/test') diff --git a/src/test/integration_tests/canfield_test.cpp b/src/test/integration_tests/canfield_test.cpp index 6a045ea..406b23a 100644 --- a/src/test/integration_tests/canfield_test.cpp +++ b/src/test/integration_tests/canfield_test.cpp @@ -5,8 +5,14 @@ #include #include "../test_helper.h" +#include "../../main/input-output/input/json-parsing/rules_parser.h" +#include "../../main/game/search-state/game_state.h" + +using std::vector; typedef test_helper th; +typedef game_state::streamliner_options so; +typedef std::initializer_list> string_il; const static std::string path = "resources/canfield/"; const static std::string type = "simple-canfield"; @@ -26,3 +32,99 @@ TEST(Canfield, SimpleUnsolvable) { TEST(Canfield, ComplexUnsolvable) { EXPECT_FALSE(th::is_solvable(path + "ComplexUnsolvable.json", type)); } + +TEST(Canfield, FoundationSingleCard) { + sol_rules sr = rules_parser::from_preset("canfield"); + game_state gs(sr, 0, so::NONE); + + ASSERT_EQ(1, test_helper::cards_in_founds(gs)); +} + +TEST(Canfield, FoundationWraps) { + sol_rules sr = rules_parser::from_preset("simple-canfield"); + + game_state gs(sr, string_il{ + {"3C"},{},{},{}, // Foundations + {},{}, // Stock-waste + {}, // Reserve + {"AC"},{},{} // Tableau piles + }); + + vector actual_moves = gs.get_legal_moves(); + vector exp_moves = { + move(move::mtype::regular, 7, 0, 1) + }; + + ASSERT_TRUE(test_helper::moves_eq(exp_moves, actual_moves)) << actual_moves; +} + +TEST(Canfield, MoveWholePile) { + sol_rules sr = rules_parser::from_preset("simple-canfield"); + + game_state gs(sr, string_il{ + {"3C"},{},{},{}, // Foundations + {},{}, // Stock-waste + {}, // Reserve + {"2H","3S","AH"},{"AC"},{"2D"} // Tableau piles + }); + + vector actual_moves = gs.get_legal_moves(); + vector exp_moves = { + move(move::mtype::built_group, 7, 8, 3) + }; + + ASSERT_TRUE(test_helper::moves_eq(exp_moves, actual_moves)) << actual_moves; +} + +TEST(Canfield, MoveWholePileNotSpace) { + sol_rules sr = rules_parser::from_preset("simple-canfield"); + + game_state gs(sr, string_il{ + {"3C"},{},{},{}, // Foundations + {},{}, // Stock-waste + {}, // Reserve + {"2H","3S","AH"},{},{"2D"} // Tableau piles + }); + + vector actual_moves = gs.get_legal_moves(); + vector exp_moves = {}; + + ASSERT_TRUE(test_helper::moves_eq(exp_moves, actual_moves)) << actual_moves; +} + +TEST(Canfield, AutoReserve) { + sol_rules sr = rules_parser::from_preset("simple-canfield"); + + game_state gs(sr, string_il{ + {"3C"},{},{},{}, // Foundations + {"3D"},{"2D"}, // Stock-waste + {"3H"}, // Reserve + {"2H","3S","AH"},{},{"AC"} // Tableau piles + }); + + vector actual_moves = gs.get_legal_moves(); + vector exp_moves = { + move(move::mtype::regular, 6, 8, 1) + }; + + ASSERT_TRUE(test_helper::moves_eq(exp_moves, actual_moves)) << actual_moves; +} + +TEST(Canfield, AutoReserveThenWaste) { + sol_rules sr = rules_parser::from_preset("simple-canfield"); + + game_state gs(sr, string_il{ + {"3C"},{},{},{}, // Foundations + {"3D"},{"3H"}, // Stock-waste + {}, // Reserve + {"2H","3S","AH"},{},{"AC"} // Tableau piles + }); + + vector actual_moves = gs.get_legal_moves(); + vector exp_moves = { + move(move::mtype::stock_k_plus, 4, 8, 1), + move(move::mtype::stock_k_plus, 4, 8, 2), + }; + + ASSERT_TRUE(test_helper::moves_eq(exp_moves, actual_moves)) << actual_moves; +} diff --git a/src/test/test_helper.cpp b/src/test/test_helper.cpp index c4f902e..33a81ca 100644 --- a/src/test/test_helper.cpp +++ b/src/test/test_helper.cpp @@ -124,6 +124,14 @@ void test_helper::k_plus_stock_test ASSERT_EQ(gs.get_data(), game_state(sr, piles).get_data()) << gs; } +uint8_t test_helper::cards_in_founds(game_state& gs) { + uint8_t sz = 0; + for (auto found : gs.foundations) { + sz += gs.piles[found].size(); + } + return sz; +} + ostream& operator <<(ostream& os, const move& m) { return os << "move:(" << int(m.from) << "," << int(m.to) diff --git a/src/test/test_helper.h b/src/test/test_helper.h index 564310e..89d28cb 100644 --- a/src/test/test_helper.h +++ b/src/test/test_helper.h @@ -11,6 +11,7 @@ #include "../main/game/card.h" #include "../main/game/pile.h" #include "../main/game/move.h" +#include "../main/game/search-state/game_state.h" class test_helper { public: @@ -30,6 +31,7 @@ public: , card ); static bool moves_eq(std::vector&, std::vector&); + static uint8_t cards_in_founds(game_state&); }; std::ostream& operator <<(std::ostream&, const move&); -- cgit v1.2.1 From 357fab143bcb41d55fb9060bcfbf257a8586e03c Mon Sep 17 00:00:00 2001 From: Charlie Blake Date: Mon, 23 Jul 2018 12:54:47 +0100 Subject: Small bug fixes inc found. base card & whole piles --- src/test/integration_tests/canfield_test.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/test') diff --git a/src/test/integration_tests/canfield_test.cpp b/src/test/integration_tests/canfield_test.cpp index 406b23a..cdb6d98 100644 --- a/src/test/integration_tests/canfield_test.cpp +++ b/src/test/integration_tests/canfield_test.cpp @@ -65,12 +65,13 @@ TEST(Canfield, MoveWholePile) { {"3C"},{},{},{}, // Foundations {},{}, // Stock-waste {}, // Reserve - {"2H","3S","AH"},{"AC"},{"2D"} // Tableau piles + {"3H","2S","AH"},{"AS"},{"2D"} // Tableau piles }); vector actual_moves = gs.get_legal_moves(); vector exp_moves = { - move(move::mtype::built_group, 7, 8, 3) + move(move::mtype::built_group, 7, 8, 3), + move(move::mtype::built_group, 8, 9, 1), }; ASSERT_TRUE(test_helper::moves_eq(exp_moves, actual_moves)) << actual_moves; -- cgit v1.2.1 From 2acab3e51cabd8ba80738b1faf791980d2abf724 Mon Sep 17 00:00:00 2001 From: Charlie Blake Date: Tue, 24 Jul 2018 12:00:04 +0100 Subject: Fix canfield to pass all unit tests --- src/test/integration_tests/canfield_test.cpp | 26 ++++++++++++++-------- src/test/resources/canfield/ComplexSolvable.json | 10 ++++----- src/test/resources/canfield/ComplexUnsolvable.json | 12 +++++----- src/test/resources/canfield/SimpleSolvable.json | 4 ++-- src/test/resources/canfield/SimpleUnsolvable.json | 10 ++++----- 5 files changed, 35 insertions(+), 27 deletions(-) (limited to 'src/test') diff --git a/src/test/integration_tests/canfield_test.cpp b/src/test/integration_tests/canfield_test.cpp index cdb6d98..006f4fb 100644 --- a/src/test/integration_tests/canfield_test.cpp +++ b/src/test/integration_tests/canfield_test.cpp @@ -97,18 +97,21 @@ TEST(Canfield, AutoReserve) { sol_rules sr = rules_parser::from_preset("simple-canfield"); game_state gs(sr, string_il{ - {"3C"},{},{},{}, // Foundations - {"3D"},{"2D"}, // Stock-waste + {"2C"},{},{},{}, // Foundations + {"3D","2D"},{}, // Stock-waste {"3H"}, // Reserve {"2H","3S","AH"},{},{"AC"} // Tableau piles }); vector actual_moves = gs.get_legal_moves(); - vector exp_moves = { - move(move::mtype::regular, 6, 8, 1) - }; + vector exp_moves = {}; ASSERT_TRUE(test_helper::moves_eq(exp_moves, actual_moves)) << actual_moves; + + boost::optional actual_dom_move = gs.get_dominance_move(); + boost::optional exp_dom_move = move(move::mtype::dominance, 6, 8, 1); + + ASSERT_EQ(exp_dom_move, actual_dom_move) << *actual_dom_move; } TEST(Canfield, AutoReserveThenWaste) { @@ -116,16 +119,21 @@ TEST(Canfield, AutoReserveThenWaste) { game_state gs(sr, string_il{ {"3C"},{},{},{}, // Foundations - {"3D"},{"3H"}, // Stock-waste + {"2D"},{"2S"}, // Stock-waste {}, // Reserve - {"2H","3S","AH"},{},{"AC"} // Tableau piles + {"2H","3S","AH"},{},{"AD"} // Tableau piles }); vector actual_moves = gs.get_legal_moves(); vector exp_moves = { - move(move::mtype::stock_k_plus, 4, 8, 1), - move(move::mtype::stock_k_plus, 4, 8, 2), + move(move::mtype::stock_k_plus, 4, 8, 0), + move(move::mtype::stock_k_plus, 4, 8, 1) }; ASSERT_TRUE(test_helper::moves_eq(exp_moves, actual_moves)) << actual_moves; + + boost::optional actual_dom_move = gs.get_dominance_move(); + boost::optional exp_dom_move = boost::none; + + ASSERT_EQ(exp_dom_move, actual_dom_move) << *actual_dom_move; } diff --git a/src/test/resources/canfield/ComplexSolvable.json b/src/test/resources/canfield/ComplexSolvable.json index 7abae7a..2a4c252 100644 --- a/src/test/resources/canfield/ComplexSolvable.json +++ b/src/test/resources/canfield/ComplexSolvable.json @@ -1,10 +1,10 @@ { "foundations": ["2C"], "tableau piles": [ - ["AS"], - ["AC"], - ["3D"] + ["3D"], + ["3H"], + ["3S"] ], - "stock": ["2H","3S"], - "reserve": ["AH","2S","3H","AD","3C","2D"] + "reserve": ["AC","2S","3C"], + "stock": ["AH","2H","AD","AS","2D"] } \ No newline at end of file diff --git a/src/test/resources/canfield/ComplexUnsolvable.json b/src/test/resources/canfield/ComplexUnsolvable.json index 3869722..297d06b 100644 --- a/src/test/resources/canfield/ComplexUnsolvable.json +++ b/src/test/resources/canfield/ComplexUnsolvable.json @@ -1,10 +1,10 @@ { - "foundations": ["2S","2C"], + "foundations": ["2C"], "tableau piles": [ - ["AS"], - ["AC"], - ["3D"] + ["AS","3D"], + ["AC","3H"], + ["3S"] ], - "stock": ["AH"], - "reserve": ["3H","2H","3S","AD","3C","2D"] + "reserve": ["AH","2S","3C"], + "stock": ["AD","2H","2D"] } \ No newline at end of file diff --git a/src/test/resources/canfield/SimpleSolvable.json b/src/test/resources/canfield/SimpleSolvable.json index 450f5bd..3353b5c 100644 --- a/src/test/resources/canfield/SimpleSolvable.json +++ b/src/test/resources/canfield/SimpleSolvable.json @@ -5,6 +5,6 @@ ["AC"], ["3D"] ], - "stock": ["AH","3S"], - "reserve": ["2H","AS","3H","2D","3C","AD"] + "reserve": ["AH","3S"], + "stock": ["2H","AS","3H","2D","3C","AD"] } \ No newline at end of file diff --git a/src/test/resources/canfield/SimpleUnsolvable.json b/src/test/resources/canfield/SimpleUnsolvable.json index aefa7b8..440c358 100644 --- a/src/test/resources/canfield/SimpleUnsolvable.json +++ b/src/test/resources/canfield/SimpleUnsolvable.json @@ -1,10 +1,10 @@ { "foundations": ["2C"], "tableau piles": [ - ["AS"], - ["AC"], - ["AD"] + ["3D"], + ["3H"], + ["3S"] ], - "stock": ["2S","3D"], - "reserve": ["3H","2H","AH","3S","3C","2D"] + "reserve": ["2S","AS"], + "stock": ["AC","2H","3C","AH","AD","2D"] } \ No newline at end of file -- cgit v1.2.1