summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2025-08-13 15:36:12 -0400
committerpommicket <pommicket@gmail.com>2025-08-13 15:36:12 -0400
commit1bc6551758fd772d48d24ffdd3c49840f9fe371d (patch)
tree473e8863f5780eb64a0211a347f42c8d81e55af8
parentfa5be295a50b53568d5501e06926d5c5851412fc (diff)
set Macondo Lexicon based on settings
-rw-r--r--quacker/macondo.cpp1
-rw-r--r--quacker/macondobackend.cpp9
2 files changed, 9 insertions, 1 deletions
diff --git a/quacker/macondo.cpp b/quacker/macondo.cpp
index 04e6b70..a07eb4a 100644
--- a/quacker/macondo.cpp
+++ b/quacker/macondo.cpp
@@ -1,7 +1,6 @@
/*
TODO:
- configurable execPath
-- set Macondo lexicon based on game
*/
#include "macondo.h"
diff --git a/quacker/macondobackend.cpp b/quacker/macondobackend.cpp
index 80a3f63..1cbd06a 100644
--- a/quacker/macondobackend.cpp
+++ b/quacker/macondobackend.cpp
@@ -1,5 +1,6 @@
#include "macondobackend.h"
#include "datamanager.h"
+#include "lexiconparameters.h"
#include "quackleio/gcgio.h"
#include "game.h"
@@ -260,6 +261,14 @@ void MacondoBackend::processStarted() {
}
commands << "\n";
}
+
+ std::string lexicon = QUACKLE_LEXICON_PARAMETERS->lexiconName();
+ for (size_t i = 0; i < lexicon.size(); i++) {
+ if (lexicon[i] >= 'a' && lexicon[i] <= 'z') {
+ lexicon[i] += 'A' - 'a';
+ }
+ }
+ commands << "set lexicon " << lexicon << "\n";
commands << "sim\n";
m_process->write(commands.str().c_str());
m_runningSimulation = true;