diff options
| author | Charlie Blake | 2018-07-19 15:45:14 +0100 |
|---|---|---|
| committer | Charlie Blake | 2018-07-19 15:45:14 +0100 |
| commit | 12e8d1f342303394f8e6be72c08a92e3a4097bfb (patch) | |
| tree | 3b13f624a164549697efdfefb0b25a2c1e45ca71 /src/test/test_helper.cpp | |
| parent | Add canfield unit tests (diff) | |
| download | metasol-12e8d1f342303394f8e6be72c08a92e3a4097bfb.tar.gz metasol-12e8d1f342303394f8e6be72c08a92e3a4097bfb.zip | |
Add Canfield unit tests
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) |
