Anagrams is a classic word game of thought and thievery. For many players, including myself, their first encounter with Anagrams occurred at the end of a long day of playing tournament Scrabble™, but it has a long popular history as well. Originating in Victorian England (according to the Wikipedia article, the first published version dates to 1877 or earlier. It has appeared in various tabletop versions over the years, one of which even made its way into a Hitchcock movie:
It can be played with any set of letter tiles, but until recently there has not been any way to play over the web.
Gameplay is simple: A certain number of tiles are placed face down into a pool on the table. As they are turned over one at a time, players attempt to form words out of them. If a player is successful at finding a word, they arrange the tiles to spell out the word and place them in front of themselves. There is no penalty for guessing incorrectly.
Play continues as before, except that now it is possible to steal an existing word. This means adding one or more tiles from the pool to a word to form a longer word. If you steal your opponent's word, it now belongs to you! You may also steal you own words to prevent anyone else from stealing them first.
There is one small catch, however. In order to make a steal, you must rearrange at least two of the tiles. For example it would be possible to steal LAUNCHPAD from CHALUPA, but you could not steal READING to form PREBOARDING because the latter can be spelled by inserting letters into the former without changing their order.
In order to reward longer words, your score is equal to the square of the word's length, and the winner is whoever has the most points at the end of the game.
- The Java 20 JDK
- If developing on Linux see here for information on setting up a development environment, or use the prepared Docker container:
docker pull grubbcc/jpro-base:jre20-fx20
. - Recommended: The GitHub CLI tool. See here for Linux download instructions.
- In order to build the webserver: Docker and docker-compose.
- Download/clone repository, e.g.
gh repo clone grubbcc/anagrams -- -b main
. - Navigate to
anagrams\AnagramsServer
and executegradlew run
. (On Linux systems first dochmod +x gradlew
.) - In another terminal navigate to
anagrams\AnagramsJPro
and executegradlew jproRun
. (For a full list of JPro commands, see here.) - In a browser tab open
localhost:8079
to see the application. - To register an account, you will need to enable the email verification service. Edit the
from
andpassword
fields inLoginMenu.java
to match an email account you control.
- In
anagrams\AnagramsServer
rungradlew distZip
. - In
anagrams\AnagramsJPro
rungradlew jproRelease
. - Extract the generated archives (under
\build\distributions
) intoanagrams\Webserver
. - From
Webserver
, rundocker -t anagrams build
. - Run
docker-compose up
. - Open
localhost
or your public IP in a browser tab to see the app. (For web access you will need to configure your network and firewall to accept HTTP traffic.) - To use the API, enter a URL of the form
localhost/<NWL20|CSW21>/<anyword>
. Click here for an example. Click here for full API documentation.