summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-07-22Make UTF-8 default encoding (and write pragma)alkamid
When reading, leave ISO-8859-1 as the default, and only change stream encoding if #character-encoding present. When writing, set encoding to UTF-8 and write #character-encoding pragma at the top of the .gcg file.
2019-07-22Fix .icns file.John Fultz
Also, fix cmake macOS build to configure the icon.
2019-07-21Clean up duplicate strategy files.John Fultz
There's only two distinct superleaves files, but there were more copies in the layout and it's a huge file. Now, lexica beginning with the text "csw" will fall back to the strategy files in the "csw" directory before going to default_english. And so, the Collins superleaves is in strategy/csw and other dictionaries default directly to strategy/default_english. Also clean up dupes of other files which didn't take much space, but at least it clarifies what strategy files are unique. Minor change to the C++ code to detect the "csw" directory.
2019-07-21Throw a version check around HiDPI attribute...which was only introduced in ↵John Fultz
Qt 5.6.
2019-07-21Make the PRNG thread-safe.John Fultz
Turns out that the C++ PRNGs aren't thread-safe. So lock calls to m_mersenneTwisterRng. Makes Thread Sanitizer happy.
2019-07-21Sims are now threaded.John Fultz
Defaults to two threads right now. This can be changed in the Simulator constructor for the time being. An interface will be added for this soon. For an example I tried, I got the following times on 500 simulations in a macOS release build: * Quackle 1.0.3 - 26 seconds * master branch, 1 thread - 27 seconds * master branch, 2 threads - 19 seconds * master branch, 4 threads - 15 seconds This isn't the most efficient use of threads. It distributes all of the plays being simmed into a thread pool, but only for one simulation. Then it comes up for air and tries again. This was the easiest to implement robustly given the current architecture.
2019-07-21Move constructor for FixedLengthString.John Fultz
2019-07-21Code cleanup.John Fultz
Remove unneeded constructors and use member initializers for Move, MoveList.
2019-07-21Move simulate code to a new static function.John Fultz
The code running the simulation is now disconnected from the Simulation class, with appropriate members being copied into a SimmedMoveConstants field (read-only, thread-safe) and a SimmedMoveMessage (the class for communicating per-sim data to and from external threads). The newly added static function, Simulate::simulateOnePosition(), should now be thread-safe and usable as a run function for a thread.
2019-07-21Rework the simulation messaging.John Fultz
Break out things that are effectively constant into a separate struct so we don't have to keep initializing them. Also, ensure that all of the things I forgot are abstracted so I can break out the per-move simulation into a different function.
2019-07-21Migrate more stuff into sim messages.John Fultz
2019-07-21Move sim toward a message passing model.John Fultz
In prep for allowing sims to be handed off to a thread pool.
2019-07-21Remove address sanitizer from cmake.John Fultz
I may add it back later as an option.
2019-07-21Add support for screen scaling under Windows/Linux.John Fultz
Seems that, unless you tell it to specifically, Qt insists on dealing with physical pixels instead of screen-scaled coordinates. So, i.e., on my 200%-scaled HiDpi display, everything was looking pretty small.
2019-07-21Visual C++ compiler warning fixes.John Fultz
Mostly signed/unsigned/size_t mismatches, except for one case treating a bool as an integer.
2019-07-20Iterate again fixing Qt/HomeBrew/Travis-CI.John Fultz
2019-07-20Iterate again fixing Qt/HomeBrew/Travis-CI.John Fultz
2019-07-20Try again to make Qt/HomeBrew/Travis-CI happy.John Fultz
2019-07-20See if this fixes Travis-CI HomeBrew path issues.John Fultz
2019-07-19Add CSW19 dictionary.John Fultz
Also, rename cswapr07 to csw07 (I think enough years have passed that the need to distinguish the "April update" has passed... but I nonetheless mention it in the copyrights file).
2019-07-19Add NWL2018 and SSWL2018 dictionaries.John Fultz
Better known as the NASPA Word List and the School SCRABBLE Word List.
2019-07-19Initial .clang-format file.John Fultz
This isn't applied everywhere, and I may fiddle with the default style, but I wanted something for targeted clang-formatting.
2019-07-19First cut of a cmake build.John Fultz
Building on macOS right now. cmake will soon replace qmake as the supported build system. Some notes about the implementation: * libquackle and libquackleio can be separately built as before. * quacker still links to the static libraries for libquackle and libquackleio, but quacker's cmake file includes those projects, which means everything builds at once. No more need to run separate builds of everything to get a GUI. And debugging is easier now that the libraries are incorporated into the quacker project. * I tried to get cmake to build the macOS app bundle, but cmake is unable, by conventional means, to build a non-flat Resources directory (which many people have complained about). Right now, the default build just builds the binary, and you have to run it from the command-line. But -DBUNDLE=ON will build a shell of a bundle. It won't work, but I intend to create an Xcode project from it for building the bundle, to make it easier for me to deliver a code-signed and notarized app bundle. * I've got CMakeLists.txt files for the resources, but they're not really doing anything right now. Maybe later. * Minimum macOS version for the cmake build is 10.10.
2019-07-19Update copyright in plist.John Fultz
2019-07-19Fix deprecation errors for Qt 5.13.John Fultz
Most are Qt4-isms, except where noted. * Replaced QFontMetrics::width with QFontMetrics::horizontalAdvance, conditionally as the latter wasn't even introduced until Qt 5.11. * QColor::light and dark instead of QColor::light and dark. * QString() instead of QString::null. * std::sort instead of qSort * QTreeWidgetItem::setSelected instead of QTreeWidget::setItemSelected. * QFileDialog::setOption(QFileDialog::DontConfirmOverwrite) instead of QFileDialog::setConfirmOverwrite(false). * QDrag::exec instead of QDrag::start.
2019-05-06Missing include.John Fultz
2019-05-06About box fixes.John Fultz
Re-sort copyrights so newer ones show up first. Exclude copyright.txt lines from about box if they don't have an actual copyright.
2019-05-06Add ability to include logo in copyrights.txt.John Fultz
Add NASPA logo for its dictionaries. Add a separator between settings and copyright for clarity. Tighten up vertical spacing in the settings panel.
2019-05-06Update copyright in about box.John Fultz
2019-03-21Licensing, copyright text changes.John Fultz
2019-02-07use --std=c+=14Martin DeMello
2019-02-07Add ruby bindingsMartin DeMello
2019-02-07Add separate python2 and python3 targets, and a flag for Qt version.Martin DeMello
2019-02-04Update a few bits of text still referring to GPL2.John Fultz
2019-02-04Add exception to GPL coverage for dictionary files.John Fultz
2019-02-04After discussion with Jason/John, add myself as a copyright holder.John Fultz
Also, extend copyright to 2019.
2019-02-03fix for passing an argument to setGlobalCandidateMartin DeMello
2019-01-14Resolve #75, update RNG to Mersenne-Twister.John Fultz
2019-01-14Fix icon for Xcode >=9 macOS build.John Fultz
Xcode now wants an asset catalog thing with proper .png files rather than a .icns thing. Bits shuffled accordingly. Also, higher res icon. Slightly different design. Only on Mac for now. Also, move minimum macOS to 10.9. Also fix 1.0.4 update versioning oversight.
2019-01-14Fix #21, committing a phoney cannot be canceled.John Fultz
When going back to edit history, typing a phoney correctly brought up a dialog, but indicating you wanted to cancel the phoney play didn't stop the play from going down, or a subsequent computer player from making its play.
2019-01-14Fix infinite loop if you give all players the same name.John Fultz
2019-01-14Remove player name from rack label text.John Fultz
The player name in the label in the rack text was being updated after every play. Not unreasonable, but this was the principle cause for layout elements bouncing horizontally across the window when plays alternated. So, now, it just has the fixed text "Rack:".
2019-01-13Add a separator above "Simulation" group box to break up the GUI better.John Fultz
2019-01-13Update TravisCI Linux builds to xenial, so I can get modern compilers for free.John Fultz
2019-01-13Attempt to fix TravisCI HomeBrew failure.John Fultz
2019-01-13Add School Scrabble 2016, 2018 word list hashes.John Fultz
2019-01-13Add hash for official OCTWL2018.John Fultz
2019-01-13C++11-style iterators in quacker sources.John Fultz
2019-01-13Fix potential crash on exit.John Fultz
Start Championship Player, then exit while the player is still thinking could crash.
2019-01-07Use range-based for iterators in sim code.John Fultz
Also, while reading through this, found one bug where a vector was being rearranged via erase/insert while an iterator was still pointing to the element being erased.