From da2f20720facda706be06b5813ab20057d5b4de9 Mon Sep 17 00:00:00 2001 From: John Fultz Date: Sun, 3 Jul 2016 02:54:38 -0500 Subject: Fix problems with "ex n" where n is a number. Found a crash where you enter "ex 4" twice, and it would crash. This led me to look up how this was implemented, and it wasn't very robust. It also didn't save properly in the GCG. So I created a new move type which I called a BlindExchange and implemented it throughout the system. --- quackleio/util.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'quackleio/util.cpp') diff --git a/quackleio/util.cpp b/quackleio/util.cpp index 5530f16..901c65e 100644 --- a/quackleio/util.cpp +++ b/quackleio/util.cpp @@ -55,6 +55,10 @@ QString Util::moveToDetailedString(const Quackle::Move &move) ret = QObject::tr("Exch. %1").arg(prettyTiles); break; + case Quackle::Move::BlindExchange: + ret = QObject::tr("Exch. %1").arg(move.tiles().length()); + break; + case Quackle::Move::UnusedTilesBonus: ret = QObject::tr("2*(%1)").arg(letterStringToQString(Util::alphagram(move.usedTiles()))); break; -- cgit v1.2.3