diff options
| author | Charlie Blake | 2018-07-24 16:17:44 +0100 |
|---|---|---|
| committer | GitHub | 2018-07-24 16:17:44 +0100 |
| commit | 6ffee36ea973433723359321dfffd43c65febf88 (patch) | |
| tree | cb3841d736ff353c5d8aea6a4faf81861ef83f5c /src/test/test_helper.cpp | |
| parent | Merge pull request #77 from thecharlesblake/add-accordion (diff) | |
| parent | Fix canfield to pass all unit tests (diff) | |
| download | metasol-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.cpp | 8 |
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) |
