aboutsummaryrefslogtreecommitdiff
path: root/src/main/game/global_cache.cpp
diff options
context:
space:
mode:
authorCharlie Blake2018-06-08 10:31:22 +0100
committerCharlie Blake2018-06-08 10:31:22 +0100
commit819a1064c5142a9b2f04ff8149d34fc915c18322 (patch)
tree6d0c8763ad79df10e6e6bcd30a0a974326e54e3a /src/main/game/global_cache.cpp
parentRemove reduced state build and logic (diff)
downloadmetasol-819a1064c5142a9b2f04ff8149d34fc915c18322.tar.gz
metasol-819a1064c5142a9b2f04ff8149d34fc915c18322.zip

Refactor legal moves gen and moves logic

Diffstat (limited to 'src/main/game/global_cache.cpp')
-rw-r--r--src/main/game/global_cache.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/game/global_cache.cpp b/src/main/game/global_cache.cpp
index f2320ef..3620ddb 100644
--- a/src/main/game/global_cache.cpp
+++ b/src/main/game/global_cache.cpp
@@ -26,7 +26,7 @@ cached_game_state::cached_game_state(const game_state& gs) {
add_card(gs.piles[gs.hole].top_card(), gs);
}
- for (game_state::pile_ref pr : gs.cells) {
+ for (pile::ref pr : gs.cells) {
add_pile(pr, gs);
}
if (gs.rules.cells > 0) {
@@ -43,21 +43,21 @@ cached_game_state::cached_game_state(const game_state& gs) {
}
}
- for (game_state::pile_ref pr : gs.reserve) {
+ for (pile::ref pr : gs.reserve) {
add_pile(pr, gs);
}
if (gs.rules.reserve_size > 0) {
add_card_divider();
}
- for (game_state::pile_ref pr : gs.tableau_piles) {
+ for (pile::ref pr : gs.tableau_piles) {
add_pile(pr, gs);
add_card_divider();
}
}
-void cached_game_state::add_pile(game_state::pile_ref pr, const game_state& gs) {
+void cached_game_state::add_pile(pile::ref pr, const game_state& gs) {
for (card c : gs.piles[pr].pile_vec) {
add_card(c, gs);
}