summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;