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. --- quacker/quacker.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'quacker/quacker.cpp') diff --git a/quacker/quacker.cpp b/quacker/quacker.cpp index be70c14..ffe6531 100644 --- a/quacker/quacker.cpp +++ b/quacker/quacker.cpp @@ -396,7 +396,9 @@ void TopLevel::setCandidateMove(const Quackle::Move &move) ensureUpToDateSimulatorMoveList(); } - if (!m_game->currentPosition().currentPlayer().racksAreKnown() && !m_game->currentPosition().currentPlayer().rack().contains(prettiedMove.usedTiles())) + if (!m_game->currentPosition().currentPlayer().racksAreKnown() && + !m_game->currentPosition().currentPlayer().rack().contains(prettiedMove.usedTiles()) && + prettiedMove.action != Quackle::Move::BlindExchange) { m_game->currentPosition().setCurrentPlayerRack(Quackle::Rack(prettiedMove.usedTiles())); } -- cgit v1.2.3