aboutsummaryrefslogtreecommitdiff
path: root/src/main/game/game_state.cpp
diff options
context:
space:
mode:
authorthecharlesblake2017-11-12 11:41:28 +0000
committerthecharlesblake2017-11-12 11:41:28 +0000
commit2b3e92a384c2483d88f48c8fcafe8ffcdfb0f3b3 (patch)
tree5e9fd865816eeb21e8fbf0ae89da6a1d1d27349d /src/main/game/game_state.cpp
parentClean up deal from shuffled deck (diff)
downloadmetasol-2b3e92a384c2483d88f48c8fcafe8ffcdfb0f3b3.tar.gz
metasol-2b3e92a384c2483d88f48c8fcafe8ffcdfb0f3b3.zip

Simplify is_solved()

Diffstat (limited to 'src/main/game/game_state.cpp')
-rw-r--r--src/main/game/game_state.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/main/game/game_state.cpp b/src/main/game/game_state.cpp
index 4caf9d9..8105cb3 100644
--- a/src/main/game/game_state.cpp
+++ b/src/main/game/game_state.cpp
@@ -214,10 +214,7 @@ bool game_state::is_solved() const {
}
}
- if (rules.hole && hole.size() != rules.max_rank * 4) {
- return false;
- }
- return true;
+ return !rules.hole || hole.size() == rules.max_rank * 4;
}
ostream& game_state::print(ostream& stream) const {