aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_helper.cpp
diff options
context:
space:
mode:
authorCharlie Blake2018-07-24 16:17:44 +0100
committerGitHub2018-07-24 16:17:44 +0100
commit6ffee36ea973433723359321dfffd43c65febf88 (patch)
treecb3841d736ff353c5d8aea6a4faf81861ef83f5c /src/test/test_helper.cpp
parentMerge pull request #77 from thecharlesblake/add-accordion (diff)
parentFix canfield to pass all unit tests (diff)
downloadmetasol-6ffee36ea973433723359321dfffd43c65febf88.tar.gz
metasol-6ffee36ea973433723359321dfffd43c65febf88.zip

Merge pull request #78 from thecharlesblake/add-canfield

Add canfield

Diffstat (limited to 'src/test/test_helper.cpp')
-rw-r--r--src/test/test_helper.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/test_helper.cpp b/src/test/test_helper.cpp
index c4f902e..33a81ca 100644
--- a/src/test/test_helper.cpp
+++ b/src/test/test_helper.cpp
@@ -124,6 +124,14 @@ void test_helper::k_plus_stock_test
ASSERT_EQ(gs.get_data(), game_state(sr, piles).get_data()) << gs;
}
+uint8_t test_helper::cards_in_founds(game_state& gs) {
+ uint8_t sz = 0;
+ for (auto found : gs.foundations) {
+ sz += gs.piles[found].size();
+ }
+ return sz;
+}
+
ostream& operator <<(ostream& os, const move& m) {
return os << "move:(" << int(m.from)
<< "," << int(m.to)