diff options
| author | thecharlesblake | 2018-01-04 11:48:21 +0000 |
|---|---|---|
| committer | thecharlesblake | 2018-01-04 11:48:21 +0000 |
| commit | 4591423f6ac5f60486664370ffcc8e0ca81eeac7 (patch) | |
| tree | e3e2a03dce209de60675e0fd32d4ce2787b73efd /src/main | |
| parent | Update random deal gen with foundations init cards (diff) | |
| download | metasol-4591423f6ac5f60486664370ffcc8e0ca81eeac7.tar.gz metasol-4591423f6ac5f60486664370ffcc8e0ca81eeac7.zip | |
Add legal move generation for waste pile
Diffstat (limited to 'src/main')
| -rw-r--r-- | src/main/game/game_state.legal_moves.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/main/game/game_state.legal_moves.cpp b/src/main/game/game_state.legal_moves.cpp index 27d7c8f..9369734 100644 --- a/src/main/game/game_state.legal_moves.cpp +++ b/src/main/game/game_state.legal_moves.cpp @@ -18,7 +18,6 @@ vector<game_state::move> game_state::get_legal_moves() const { for (pile_ref rem_ref = 0; rem_ref < piles.size(); rem_ref++) { // Never removes a card from the hole, the waste, or an empty pile if (rem_ref == hole - || rem_ref == waste || piles[rem_ref].empty()) continue; // Stock cards can only be moved to the waste @@ -42,11 +41,6 @@ vector<game_state::move> game_state::get_legal_moves() const { } } - // Any card can be added to the waste - if (waste != PILE_REF_MAX && waste != rem_ref) { - moves.emplace_back(rem_ref, waste); - } - // For each foundation pile, check if moving from the rem pile is a valid // move according to the rules for (auto add_ref : foundations) { |
