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 --- .../game_state.auto_foundation_moves.cpp | 155 ------------------- src/main/game/search-state/game_state.cpp | 10 ++ .../search-state/game_state.dominance_moves.cpp | 172 +++++++++++++++++++++ src/main/game/search-state/game_state.h | 3 + .../game/search-state/game_state.legal_moves.cpp | 58 ++++--- src/main/input-output/input/sol_preset_types.cpp | 4 +- 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 +- 11 files changed, 257 insertions(+), 207 deletions(-) delete mode 100644 src/main/game/search-state/game_state.auto_foundation_moves.cpp create mode 100644 src/main/game/search-state/game_state.dominance_moves.cpp (limited to 'src') diff --git a/src/main/game/search-state/game_state.auto_foundation_moves.cpp b/src/main/game/search-state/game_state.auto_foundation_moves.cpp deleted file mode 100644 index b2b55b3..0000000 --- a/src/main/game/search-state/game_state.auto_foundation_moves.cpp +++ /dev/null @@ -1,155 +0,0 @@ -// -// Created by thecharlesblake on 07/06/18. -// - -#include "game_state.h" -#include "../sol_rules.h" - - -typedef sol_rules::build_policy pol; -typedef game_state::streamliner_options sos; -typedef sol_rules::stock_deal_type sdt; - -using std::max; - - -bool game_state::is_valid_auto_foundation_move(pile::ref target_pile) const { - if (rules.foundations_only_comp_piles) - return false; - else if ( stream_opts == sos::AUTO_FOUNDATIONS - || stream_opts == sos::BOTH - || rules.build_pol == pol::NO_BUILD - || rules.build_pol == pol::SAME_SUIT) - return true; - - card::suit_t target_suit(target_pile - foundations.front()); - card::rank_t move_up_rank = piles[target_pile].empty() - ? card::rank_t(1) - : foundation_base_convert(piles[target_pile].top_card().get_rank() + card::rank_t(1)); - - // The card to be moved up - card move_up_card(target_suit, move_up_rank); - - // The max difference between the 'move up' card and the foundations of the - // same colour and the other colour - int same_rank_diff = 0; - int other_rank_diff = 0; - for (pile::ref pr : foundations) { - if (pr == target_pile) continue; - - card::suit_t s(pr - foundations.front()); - card::rank_t r = piles[pr].empty() ? card::rank_t(0) - : foundation_base_convert(piles[pr].top_card().get_rank()); - card c(s, r); - - auto rank_diff = int(move_up_card.get_rank() - r); - if (move_up_card.get_suit() == c.get_suit() - || (rules.build_pol == pol::RED_BLACK - && move_up_card.get_colour() == c.get_colour())) { - same_rank_diff = rank_diff; - } else { - other_rank_diff = max(other_rank_diff, rank_diff); - } - } - - bool other_within_1 = other_rank_diff <= 1; - bool other_within_2 = other_rank_diff <= 2; - bool same_within_3 = same_rank_diff <= 3; - - if (rules.build_pol == pol::RED_BLACK) { - return other_within_1 || (other_within_2 && same_within_3); - } else { - assert(rules.build_pol == pol::ANY_SUIT); - return other_within_2; - } -} - -// Returns a dominance move if one is available -boost::optional game_state::get_dominance_move() const { -#ifndef NO_AUTO_FOUNDATIONS - // If there are 2 decks or no foundations, return - if (!rules.foundations_present || rules.two_decks) - return boost::none; - - // Cycles through the piles and sees if any cards can be automatically moved - // to the foundations - for (pile::ref pr = 0; pr < piles.size(); pr++) { - // Don't move foundation cards, hole, waste or stock cards to the foundations - if ((pr >= foundations.front() && pr <= foundations.back()) - || (rules.hole && pr == hole) - || (rules.stock_size > 0 && pr == stock) - || (rules.stock_size > 0 && rules.stock_deal_t == sdt::WASTE && pr == waste) - || (piles[pr].empty())) { - continue; - } - - card c = piles[pr].top_card(); - pile::ref target_foundation = foundations[c.get_suit()]; - - // If the card is the right rank and the auto-move boolean is true, then - // returns the move - card::rank_t target_rank = piles[target_foundation].empty() - ? card::rank_t(1) - : foundation_base_convert(piles[target_foundation].top_card().get_rank() + card::rank_t(1)); - if (target_rank == foundation_base_convert(c.get_rank()) && - auto_foundation_moves[c.get_suit()]) { - move m(move::mtype::dominance, pr, target_foundation); - - // If this dominance move reveals a card, adds this to the move - if (piles[pr].size() > 1 && piles[pr][1].is_face_down()) - m.make_reveal_move(); - - return m; - } - } -#endif - - return boost::none; -} - -bool game_state::is_ordered_pile(pile::ref pr) const { - if (piles[pr].size() != rules.max_rank) return false; - - card::suit_t s = piles[pr][0].get_suit(); - for (card::rank_t r = 0; r < rules.max_rank; r++) { - if (piles[pr][r] != card(s, card::rank_t(r + 1))) return false; - } - return true; -} - -// For games where the foundations can be removed from, this dominance blocks -// the foundations being removed from if the card that were to be removed would -// go 'automatically' up -bool game_state::dominance_blocks_foundation_move(pile::ref target_pile) { - assert(!piles[target_pile].empty()); - - card target_card = piles[target_pile].top_card(); - piles[target_pile].take(); - - bool blocked = is_valid_auto_foundation_move(target_pile); - piles[target_pile].place(target_card); - - return blocked; -} - -// Decides which 'auto foundation' booleans should be 'true' currently -void game_state::update_auto_foundation_moves(pile::ref target_pile) { - // If there are no foundations, or this is not a foundation move, do nothing - if (!rules.foundations_present - || target_pile < foundations.front() - || target_pile > foundations.back()) { - return; - } - - // Turns the 'auto' boolean for the target foundation false - - for (pile::ref pr : foundations) { - auto_foundation_moves[pr] = is_valid_auto_foundation_move(pr); - } -} - -card::rank_t game_state::foundation_base_convert(card::rank_t r) const { - card::rank_t s = r - (foundations_base - card::rank_t(1)); - if (s < 1) s += rules.max_rank; - return s; -} diff --git a/src/main/game/search-state/game_state.cpp b/src/main/game/search-state/game_state.cpp index 78247bf..17fdc29 100644 --- a/src/main/game/search-state/game_state.cpp +++ b/src/main/game/search-state/game_state.cpp @@ -263,6 +263,16 @@ game_state::game_state(const sol_rules& s_rules, } pr++; } + + // Sets foundations base appropriately + if (rules.foundations_present && rules.foundations_base == boost::none) { + for (auto f : foundations) { + if (!piles[f].empty()) { + foundations_base = piles[f].top_card().get_rank(); + return; + } + } + } } // Generates a randomly ordered vector of cards diff --git a/src/main/game/search-state/game_state.dominance_moves.cpp b/src/main/game/search-state/game_state.dominance_moves.cpp new file mode 100644 index 0000000..b7e6e15 --- /dev/null +++ b/src/main/game/search-state/game_state.dominance_moves.cpp @@ -0,0 +1,172 @@ +// +// Created by thecharlesblake on 07/06/18. +// + +#include "game_state.h" +#include "../sol_rules.h" + + +typedef sol_rules::build_policy pol; +typedef game_state::streamliner_options sos; +typedef sol_rules::stock_deal_type sdt; +typedef sol_rules::spaces_policy s_pol; + +using std::max; +using boost::optional; + +bool game_state::is_valid_auto_foundation_move(pile::ref target_pile) const { + if (rules.foundations_only_comp_piles) + return false; + else if ( stream_opts == sos::AUTO_FOUNDATIONS + || stream_opts == sos::BOTH + || rules.build_pol == pol::NO_BUILD + || rules.build_pol == pol::SAME_SUIT) + return true; + + card::suit_t target_suit(target_pile - foundations.front()); + card::rank_t move_up_rank = piles[target_pile].empty() + ? card::rank_t(1) + : foundation_base_convert(piles[target_pile].top_card().get_rank() + card::rank_t(1)); + + // The card to be moved up + card move_up_card(target_suit, move_up_rank); + + // The max difference between the 'move up' card and the foundations of the + // same colour and the other colour + int same_rank_diff = 0; + int other_rank_diff = 0; + for (pile::ref pr : foundations) { + if (pr == target_pile) continue; + + card::suit_t s(pr - foundations.front()); + card::rank_t r = piles[pr].empty() ? card::rank_t(0) + : foundation_base_convert(piles[pr].top_card().get_rank()); + card c(s, r); + + auto rank_diff = int(move_up_card.get_rank() - r); + if (move_up_card.get_suit() == c.get_suit() + || (rules.build_pol == pol::RED_BLACK + && move_up_card.get_colour() == c.get_colour())) { + same_rank_diff = rank_diff; + } else { + other_rank_diff = max(other_rank_diff, rank_diff); + } + } + + bool other_within_1 = other_rank_diff <= 1; + bool other_within_2 = other_rank_diff <= 2; + bool same_within_3 = same_rank_diff <= 3; + + if (rules.build_pol == pol::RED_BLACK) { + return other_within_1 || (other_within_2 && same_within_3); + } else { + assert(rules.build_pol == pol::ANY_SUIT); + return other_within_2; + } +} + +// Returns a dominance move if one is available +optional game_state::get_dominance_move() const { +#ifndef NO_AUTO_FOUNDATIONS + if (rules.spaces_pol == s_pol::AUTO_RESERVE_THEN_WASTE) { + optional arm = auto_reserve_move(); + if (arm) return arm; + } + + // If there are 2 decks or no foundations, return + if (!rules.foundations_present || rules.two_decks) + return boost::none; + + // Cycles through the piles and sees if any cards can be automatically moved + // to the foundations + for (pile::ref pr = 0; pr < piles.size(); pr++) { + // Don't move foundation cards, hole, waste or stock cards to the foundations + if ((pr >= foundations.front() && pr <= foundations.back()) + || (rules.hole && pr == hole) + || (rules.stock_size > 0 && pr == stock) + || (rules.stock_size > 0 && rules.stock_deal_t == sdt::WASTE && pr == waste) + || (piles[pr].empty())) { + continue; + } + + card c = piles[pr].top_card(); + pile::ref target_foundation = foundations[c.get_suit()]; + + // If the card is the right rank and the auto-move boolean is true, then + // returns the move + card::rank_t target_rank = piles[target_foundation].empty() + ? card::rank_t(1) + : foundation_base_convert(piles[target_foundation].top_card().get_rank() + card::rank_t(1)); + if (target_rank == foundation_base_convert(c.get_rank()) && + auto_foundation_moves[c.get_suit()]) { + move m(move::mtype::dominance, pr, target_foundation); + + // If this dominance move reveals a card, adds this to the move + if (piles[pr].size() > 1 && piles[pr][1].is_face_down()) + m.make_reveal_move(); + + return m; + } + } +#endif + + return boost::none; +} + +optional game_state::auto_reserve_move() const { + if (rules.spaces_pol == s_pol::AUTO_RESERVE_THEN_WASTE && !piles[reserve.front()].empty()) { + for (auto to : tableau_piles) { + if (piles[to].empty()) { + return move(move::mtype::dominance, reserve.front(), to); + } + } + } + return boost::none; +} + +bool game_state::is_ordered_pile(pile::ref pr) const { + if (piles[pr].size() != rules.max_rank) return false; + + card::suit_t s = piles[pr][0].get_suit(); + for (card::rank_t r = 0; r < rules.max_rank; r++) { + if (piles[pr][r] != card(s, card::rank_t(r + 1))) return false; + } + return true; +} + +// For games where the foundations can be removed from, this dominance blocks +// the foundations being removed from if the card that were to be removed would +// go 'automatically' up +bool game_state::dominance_blocks_foundation_move(pile::ref target_pile) { + assert(!piles[target_pile].empty()); + + card target_card = piles[target_pile].top_card(); + piles[target_pile].take(); + + bool blocked = is_valid_auto_foundation_move(target_pile); + piles[target_pile].place(target_card); + + return blocked; +} + +// Decides which 'auto foundation' booleans should be 'true' currently +void game_state::update_auto_foundation_moves(pile::ref target_pile) { + // If there are no foundations, or this is not a foundation move, do nothing + if (!rules.foundations_present + || target_pile < foundations.front() + || target_pile > foundations.back()) { + return; + } + + // Turns the 'auto' boolean for the target foundation false + + for (pile::ref pr : foundations) { + auto_foundation_moves[pr] = is_valid_auto_foundation_move(pr); + } +} + +card::rank_t game_state::foundation_base_convert(card::rank_t r) const { + card::rank_t s = r - (foundations_base - card::rank_t(1)); + if (s < 1) s += rules.max_rank; + return s; +} diff --git a/src/main/game/search-state/game_state.h b/src/main/game/search-state/game_state.h index f6fc666..d8d9f12 100644 --- a/src/main/game/search-state/game_state.h +++ b/src/main/game/search-state/game_state.h @@ -111,6 +111,7 @@ private: bool is_valid_hole_move(pile::ref) const; bool is_valid_hole_move(card) const; + void add_valid_tableau_moves(std::vector&, pile::ref) const; void add_built_group_moves(std::vector&) const; void add_built_group_moves(std::vector&, pile::ref, pile::size_type) const; void add_whole_pile_moves(std::vector&) const; @@ -121,6 +122,7 @@ private: void add_kings_only_built_group_move(std::vector&, pile::ref, pile::ref, pile::size_type, bool) const; void add_non_empty_built_group_move(std::vector&, pile::ref, pile::ref, pile::size_type, bool) const; void add_sequence_moves(std::vector&) const; + bool tableau_space_and_auto_reserve() const; bool is_next_legal_card(sol_rules::build_policy, card, card, bool) const; bool is_next_legal_card(std::vector, card, card) const; @@ -128,6 +130,7 @@ private: /* Auto-foundation moves */ + boost::optional auto_reserve_move() const; bool is_valid_auto_foundation_move(pile::ref) const; bool is_ordered_pile(pile::ref) const; bool dominance_blocks_foundation_move(pile::ref); 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 09a32fa..f97814a 100644 --- a/src/main/game/search-state/game_state.legal_moves.cpp +++ b/src/main/game/search-state/game_state.legal_moves.cpp @@ -74,9 +74,7 @@ vector game_state::get_legal_moves(move parent_move) { for (auto f : foundations) { if (piles[f].empty() || parent_move.to == f || dominance_blocks_foundation_move(f)) continue; - for (auto t : tableau_piles) - if (is_valid_tableau_move(f, t)) - moves.emplace_back(move::mtype::regular, f, t); + add_valid_tableau_moves(moves, f); if (empty_cell != 255) moves.emplace_back(move::mtype::regular, f, empty_cell); @@ -87,17 +85,14 @@ vector game_state::get_legal_moves(move parent_move) { for (auto r : reserve) { if (piles[r].empty()) continue; - for (auto t : tableau_piles) { - if (is_valid_tableau_move(r, t)) { - moves.emplace_back(move::mtype::regular, r, t); - } - } + add_valid_tableau_moves(moves, r); } - // Stock to tableau moves + // Stock-waste to tableau moves if (rules.stock_size > 0 && rules.stock_deal_t == sdt::WASTE) add_stock_to_tableau_moves(moves); + // Tableau built group moves switch (rules.move_built_group) { case sol_rules::built_group_type::YES: add_built_group_moves(moves); @@ -115,11 +110,7 @@ vector game_state::get_legal_moves(move parent_move) { for (auto t_from : tableau_piles) { if (piles[t_from].empty() || parent_move.to == t_from) continue; - for (auto t_to : tableau_piles) { - if (is_valid_tableau_move(t_from, t_to)) { - moves.emplace_back(move::mtype::regular, t_from, t_to); - } - } + add_valid_tableau_moves(moves, t_from); } } @@ -132,11 +123,7 @@ vector game_state::get_legal_moves(move parent_move) { for (auto c : cells) { if (piles[c].empty() || parent_move.to == c) continue; - for (auto t : tableau_piles) { - if (is_valid_tableau_move(c, t)) { - moves.emplace_back(move::mtype::regular, c, t); - } - } + add_valid_tableau_moves(moves, c); } // Tableau / cells / reserve / stock-waste to hole / foundation moves @@ -233,9 +220,14 @@ void game_state::add_stock_to_tableau_moves(std::vector& moves) const { for (auto k_plus_mv : generate_k_plus_moves_to_check()) { card from = stock_card_from_count(k_plus_mv.first); - for (auto t : tableau_piles) - if (is_valid_tableau_move(from, t)) + // Obeys the auto-reserve restriction unless the reserve is empty + if (!piles[reserve.front()].empty() && tableau_space_and_auto_reserve()) return; + + for (auto t : tableau_piles) { + if (is_valid_tableau_move(from, t)) { moves.emplace_back(move::mtype::stock_k_plus, stock, t, k_plus_mv.first, false, k_plus_mv.second); + } + } } } @@ -313,6 +305,8 @@ bool game_state::is_valid_foundations_move(const pile::ref rem_ref, bool game_state::is_valid_foundations_move(const card rem_c, const pile::ref add_ref) const { + if (piles[add_ref].size() == rules.max_rank) return false; + // Checks same suit policy uint8_t suit_idx = (add_ref - foundations.front()) % uint8_t(4); if (rem_c.get_suit() != suit_idx) @@ -320,9 +314,9 @@ bool game_state::is_valid_foundations_move(const card rem_c, // Checks rank if (piles[add_ref].empty()) - return rem_c.get_rank() == rules.foundations_base; + return rem_c.get_rank() == foundations_base; else - return rem_c.get_rank() == (piles[add_ref].top_card().get_rank() + 1) % rules.max_rank; + return rem_c.get_rank() == (piles[add_ref].top_card().get_rank() % rules.max_rank) + 1; } bool game_state::is_valid_hole_move(const pile::ref rem_ref) const { @@ -345,6 +339,16 @@ bool game_state::is_valid_hole_move(const card c) const { // BUILT-GROUP MOVE GEN FUNCTIONS // //////////////////////////////////// +void game_state::add_valid_tableau_moves(std::vector& moves, pile::ref from) const { + if (tableau_space_and_auto_reserve()) return; + + for (auto to : tableau_piles) { + if (is_valid_tableau_move(from, to)) { + moves.emplace_back(move::mtype::regular, from, to); + } + } +} + void game_state::add_built_group_moves(vector& moves) const { assert(rules.built_group_pol != pol::NO_BUILD); @@ -383,6 +387,7 @@ void game_state::add_built_group_moves(vector& moves, pile::ref rem_ref, p void game_state::add_whole_pile_moves(vector& moves) const { assert(rules.built_group_pol != pol::NO_BUILD); + if (tableau_space_and_auto_reserve()) return; // Cycles through each pile to see if it contains a whole-pile built group for (auto rem_ref : tableau_piles) { @@ -534,6 +539,13 @@ void game_state::add_accordion_moves(vector& moves) const { } } +// If auto-reserve is enabled and there is a space, returns +bool game_state::tableau_space_and_auto_reserve() const { + if (rules.spaces_pol == s_pol::AUTO_RESERVE_THEN_WASTE) + for (auto to : tableau_piles) + if (piles[to].empty()) return true; + return false; +} /////////////////////// diff --git a/src/main/input-output/input/sol_preset_types.cpp b/src/main/input-output/input/sol_preset_types.cpp index d3daf40..0aee219 100644 --- a/src/main/input-output/input/sol_preset_types.cpp +++ b/src/main/input-output/input/sol_preset_types.cpp @@ -290,7 +290,7 @@ map sol_preset_types::mp = { "redeal": true }, "reserve": { - "size": 14, + "size": 13, "stacked": true } } @@ -314,7 +314,7 @@ map sol_preset_types::mp = { "base card": "random" }, "stock": { - "size": 1, + "size": 6, "deal count": 3, "redeal": true }, 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