| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Herein is a high-performance solver for Apple News+ game Quartiles, written in Rust using the Ratatui text-based user interface (TUI) library.
There are two modes of operation: generate and solve. The mode is specified by eponymous subcommand.
In both modes, the application looks for an English dictionary in the directory specified via the -d option, which defaults to dict if unspecified. The name of the dictionary, sans the file extension, is specified via the -n option, which defaults to english if unspecified. If a binary dictionary (.dict) is present, then the application uses it; otherwise, the plaintext dictionary (.txt) is used instead, and an eponymous binary dictionary (.dict) is generated next to the plaintext one.
In generate mode, the application exits after performing the conversion.
In solve mode, the application opens the TUI:
The user may then fill in the Quartiles board by navigating among the cells. The following commands are available:
After filling in a board, it should look something like this:
The user may then press Enter to launch the solver. The solver animates its traversal of the search space, highlighting valid words and adding them to the Solution:
While the solver is running, the user may press Escape to exit the program. When the solver completes, an indication of success or failure appears along the bottom edge of the Puzzle pane, and focus moves to the Solution pane.
The following commands are available:
After the TUI exits, the terminal is restored and the complete solution is written to standard output (unless the -q option is used).
$ cargo build --releaseIn generate mode:
$ cargo run --release generateIn solve mode:
$ cargo run --release solveTo display the main modes and general options:
at 21:36:01 ➜ cargo run --release -- --help
CLI for solving Quartiles puzzles
Usage: quartiles-solver [OPTIONS] <COMMAND>
Commands:
generate Just generate the binary dictionary and exit
solve Open the text-based user interface (TUI) for inputting and solving a Quartiles puzzle. The solution will be written to standard output
help Print this message or the help of the given subcommand(s)
Options:
-d, --directory <DIRECTORY> The path to the directory containing the dictionary files. Can be changed from the TUI [default: dict]
-n, --dictionary <DICTIONARY> The name of the dictionary. This is the name shared by the text and binary files, sans the extension. Can be changed from the TUI [default: english]
-h, --help Print help
-V, --version Print version
When running the application in generate mode, no special options are recognized.
When running the application in solve mode, the follow options are recognized:
at 21:35:21 ➜ cargo run --release solve --help
Open the text-based user interface (TUI) for inputting and solving a Quartiles
puzzle. The solution will be written to standard output
Usage: quartiles-solver solve [OPTIONS]
Options:
-d, --highlight-duration <HIGHLIGHT_DURATION>
How long (in µs) to highlight an individual word in the TUI [default: 400]
-q, --quiet
Suppress emission of the solution to standard output
-h, --help
Print help
$ cargo test$ cargo benchYou can install the binary, quartiles-solver, so that it can be run without the project directory:
$ cargo install --path .Be sure to copy the dictionary directory to its desired installation location. To use the installed binary, you will have to specify this location when running the application:
$ quartiles-solver -d /path/to/installed/directoryYou must also specify -n if you renamed the dictionary files.
| Back | FazBrowse Home | New Git URL |