diff options
| author | Charlie Blake | 2018-06-29 11:34:09 +0100 |
|---|---|---|
| committer | Charlie Blake | 2018-06-29 11:34:09 +0100 |
| commit | 5fde1f9563c98e2d661ac495e448d35eeb97e68c (patch) | |
| tree | da08d5ab8602567130dbd9ccaa1863d7ea4dda77 /src/main/game/search-state/game_state.h | |
| parent | Implement to pass unit tests (diff) | |
| download | metasol-5fde1f9563c98e2d661ac495e448d35eeb97e68c.tar.gz metasol-5fde1f9563c98e2d661ac495e448d35eeb97e68c.zip | |
Fix bugs + correct built pile kings. Cell + founds
Diffstat (limited to 'src/main/game/search-state/game_state.h')
| -rw-r--r-- | src/main/game/search-state/game_state.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/main/game/search-state/game_state.h b/src/main/game/search-state/game_state.h index b8b0d03..f6f41d9 100644 --- a/src/main/game/search-state/game_state.h +++ b/src/main/game/search-state/game_state.h @@ -24,6 +24,7 @@ class game_state { friend class cached_game_state; friend class deal_parser; friend class state_printer; + friend class test_helper; public: /* Constructors */ @@ -73,12 +74,10 @@ private: void undo_regular_move(move move); void make_built_group_move(move move); void undo_built_group_move(move move); - void make_stock_to_waste_move(move move); - void undo_stock_to_waste_move(move move); - void make_stock_to_tableau_move(move move); - void undo_stock_to_tableau_move(move move); - void make_redeal_move(); - void undo_redeal_move(); + void make_stock_k_plus_move(move move); + void undo_stock_k_plus_move(move move); + void make_stock_to_all_tableau_move(move move); + void undo_stock_to_all_tableau_move(move move); #ifndef NDEBUG void check_face_down_consistent() const; @@ -86,23 +85,24 @@ private: /* Legal move generation */ - bool stock_can_deal_tableau() const; - move get_stock_tableau_move() const; - bool stock_can_redeal() const; - bool undoes_prev_move(pile::ref, move) const; - bool is_foundation(pile::ref) const; + bool stock_can_deal_all_tableau() const; + move get_stock_to_all_tableau_move() const; - void add_stock_to_waste_move(std::vector<move>&) const; - void add_tableau_moves(std::vector<move>&, pile::ref) const; - void add_cell_moves(std::vector<move>&, pile::ref) const; - void add_foundation_moves(std::vector<move>&, pile::ref) const; + std::set<pile::size_type> generate_stock_moves_to_check() const; + void add_stock_to_cell_move(std::vector<move>&, pile::ref) const; + void add_stock_to_tableau_moves(std::vector<move>&) const; + void add_stock_to_hole_foundation_moves(std::vector<move>&) const; + card stock_card_from_index(pile::size_type) const; void add_built_group_moves(std::vector<move> &) const; void add_foundation_complete_piles_moves(std::vector<move> &) const; bool is_valid_tableau_move(pile::ref, pile::ref) const; + bool is_valid_tableau_move(card, pile::ref) const; bool is_next_tableau_card(card, card) const; bool is_valid_foundations_move(pile::ref, pile::ref) const; + bool is_valid_foundations_move(card, pile::ref) const; bool is_valid_hole_move(pile::ref) const; + bool is_valid_hole_move(card) const; pile::size_type get_built_group_height(pile::ref) const; void add_empty_built_group_moves(std::vector<move>&, pile::ref, pile::ref, |
