summaryrefslogtreecommitdiff
path: root/bag.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bag.cpp')
-rw-r--r--bag.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/bag.cpp b/bag.cpp
index b9d95ad..e4ebef9 100644
--- a/bag.cpp
+++ b/bag.cpp
@@ -55,6 +55,15 @@ void Bag::prepareFullBag()
m_tiles.push_back(letter);
}
+int Bag::fullBagTileCount()
+{
+ int tileCount = 0;
+ // we start at 0 because we want to include blanks etcetera
+ for (Letter letter = 0; letter <= QUACKLE_ALPHABET_PARAMETERS->lastLetter(); ++letter)
+ tileCount += QUACKLE_ALPHABET_PARAMETERS->count(letter);
+ return tileCount;
+}
+
void Bag::toss(const LetterString &letters)
{
const LetterString::const_iterator end(letters.end());