summaryrefslogtreecommitdiff
path: root/quacker/macondobackend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'quacker/macondobackend.cpp')
-rw-r--r--quacker/macondobackend.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/quacker/macondobackend.cpp b/quacker/macondobackend.cpp
index 628066a..db9eee3 100644
--- a/quacker/macondobackend.cpp
+++ b/quacker/macondobackend.cpp
@@ -191,9 +191,12 @@ Quackle::Move MacondoBackend::createPlaceMove(const std::string &placement, cons
dotDescription += tiles.substr(i);
break;
}
- dotDescription += tiles.substr(i, j) + ".";
+ dotDescription += tiles.substr(i, j - i);
i = tiles.find(')', j);
if (i == std::string::npos) throw "mismatched parentheses";
+ // add appropriate number of dots
+ for (size_t d = 1; d < i - j; d++)
+ dotDescription.push_back('.');
i++;
}
auto move = Quackle::Move::createPlaceMove(placement, QUACKLE_ALPHABET_PARAMETERS->encode(dotDescription));