aboutsummaryrefslogtreecommitdiff
path: root/src/main/game
diff options
context:
space:
mode:
authorCharlie Blake2018-07-03 14:49:25 +0100
committerCharlie Blake2018-07-03 14:49:25 +0100
commit9114b8032cadd17553a07daef49e2272aa4116e9 (patch)
treee220211c8313be2b25f1aebf537ffbf4a352f1db /src/main/game
parentFix klondike bugs (diff)
downloadmetasol-9114b8032cadd17553a07daef49e2272aa4116e9.tar.gz
metasol-9114b8032cadd17553a07daef49e2272aa4116e9.zip

Tidy up stock rep and amend broken unit tests

Diffstat (limited to 'src/main/game')
-rw-r--r--src/main/game/search-state/game_state.legal_moves.cpp42
1 files changed, 0 insertions, 42 deletions
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 42ba578..5dfa00a 100644
--- a/src/main/game/search-state/game_state.legal_moves.cpp
+++ b/src/main/game/search-state/game_state.legal_moves.cpp
@@ -21,11 +21,6 @@ typedef sol_rules::spaces_policy s_pol;
typedef sol_rules::stock_deal_type sdt;
typedef sol_rules::face_up_policy fu;
-// TODO: delete
-using std::ostream;
-std::ostream& operator <<(std::ostream&, const move&);
-std::ostream& operator <<(std::ostream&, const std::vector<move>&);
-
////////////////////////////////
// MAIN LEGAL MOVE GEN CYCLE ///
////////////////////////////////
@@ -145,46 +140,9 @@ vector<move> game_state::get_legal_moves(move parent_move) {
if (rules.tableau_pile_count > 0 && rules.face_up != fu::ALL)
turn_face_down_cards(moves);
- // TODO: delete
-//#ifndef NDEBUG
-// std::cerr << "Moves:\n" << moves;
- /*vector<move>::size_type i = 0;
- std::cin >> i;
- move m = moves[i];
- moves.erase(moves.begin() + i);
- moves.push_back(m);*/
-//#endif
-
return moves;
}
-/*#ifndef NDEBUG
-// TODO: delete
-ostream& operator <<(ostream& os, const move& m) {
- switch (m.type) {
- case move::mtype::regular: os << "regular"; break;
- case move::mtype::dominance: os << "dominance"; break;
- case move::mtype::built_group: os << "built_group"; break;
- case move::mtype::stock_k_plus: os << "stock_k_plus"; break;
- case move::mtype::stock_to_all_tableau: os << "stock_to_all_tableau"; break;
- case move::mtype::null: os << "null"; break;
- }
- os << " (" << int(m.from)
- << "," << int(m.to)
- << "," << int(m.count)
- << "," << m.reveal_move
- << ")";
- return os;
-}
-ostream& operator <<(ostream& os, const vector<move>& moves) {
- int i = 0;
- for (const move m : moves) {
- os << m << " "<< i++ << "\n";
- }
- return os;
-}
-#endif*/
-
////////////////////////////////
// REGULAR MOVE GEN FUNCTIONS //