summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Fultz <jfultz@wolfram.com>2014-08-12 02:35:18 -0500
committerJohn Fultz <jfultz@wolfram.com>2014-08-12 02:35:18 -0500
commit013db5c0f2e6fb21c04fb415ed887b13769d1684 (patch)
treec88425792c996ef5b6b9a4a25472f984a16adecd
parent1e014de2255e9d790b55e5e26ed420df7e6a0790 (diff)
Make the textual reporter sort the leave.
Sometimes, the leave was printed in a partially unsorted fashion. I suspect this has to do with using opponents with no racks. Whatever the cause, sorting it is trivial.
-rw-r--r--reporter.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/reporter.cpp b/reporter.cpp
index 62fce18..c471c9d 100644
--- a/reporter.cpp
+++ b/reporter.cpp
@@ -200,6 +200,7 @@ void Reporter::reportPosition(const GamePosition &position, ComputerPlayer *comp
int j = 0;
UVString wrappedTiles;
LongLetterString unseenTiles = position.unseenBag().tiles();
+ std::sort(unseenTiles.begin(), unseenTiles.end());
for (Quackle::LongLetterString::const_iterator it = unseenTiles.begin(); it != unseenTiles.end(); ++it, ++j)
{
if (j >= 44)