From c1055b0b9c58bbe07d376707318028d1e6026162 Mon Sep 17 00:00:00 2001 From: pommicket Date: Sun, 24 Aug 2025 13:27:27 -0400 Subject: Fix dotDescription issues, update README --- quacker/macondobackend.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'quacker/macondobackend.cpp') 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)); -- cgit v1.2.3