From 4591423f6ac5f60486664370ffcc8e0ca81eeac7 Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Thu, 4 Jan 2018 11:48:21 +0000 Subject: Add legal move generation for waste pile --- src/main/game/game_state.legal_moves.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src') 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::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::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) { -- cgit v1.2.1