This is a fork of Hans Huebner's https://github.com/hanshuebner/html-scrabble
- Implemented 'Duplicate' variant (https://en.wikipedia.org/wiki/Duplicate_Scrabble)
- Dictionary search/validation (using TRIE search)
- Improved rack drag'n'drop. Easier rack organizaiton : A tile can be dropped on another one. The other tiles will be pushed around.
- UI in French only ATM. I quickly replaced english with french before playing with family while in confinement. This is bad, sorry. I'll fix that later
- Internationalization
- Timer
- Add support for touch screens
- Improve 'Duplicate' variant support:
- Auto-swap rack letters according to rules (at least 2 consonants && 2 vowels on first 15 turns, then 1/1)
- Arbitration when draw at end of round
The game uses node.js as server and depends on some npm packages. To install dependencies:
$ npm install
Some react components have been added (divergence from original repo):
$ npm run build-jsx
Settings can be be changed by the way of a configuration file which must be named 'config.json' and placed in the main html-scrabble directory. The default configuration file is included as config-default.json. It can be copied to config.json and then edited.
By default, the server starts on port 9093 and uses the smtp server running on the local host to send out game invitation emails. The invitation emails contain the "localhost" in the URL, so they will only work for a browser running on the same machine as the server.
As a minimum, the baseUrl
and mailSender
configuration
properties should be changed. Furthermore, if you are not running an
SMTP server on your server, you need to set the
mailTransportConfig
appropriately. Please refer to nodemailer
documentation
for information on how to configure nodemailer.
If you deploy your Scrabble server in the Internet, you may want to
protect your game list so that pranksters can't mess up your games.
You can do so by adding a gameListLogin
property to your
configuration like so:
"gameListLogin": {
"username": "foo",
"password": "bar"
}
Note that this is meant as a light protective measure. Do not use a password that you use elsewhere. Thank you for observing all safety measures.
Once you're satisfied with the configuration, you can start the game server using
$ node server.js
Open your web browser on the configured game URL to create a new game.
jq -c 'select(.key != "b657b5d33a7736b0")' data.db | sponge data.db
If you have trouble getting the server to run, feel free to contact me. Be aware, though, that you will need a machine to run the server on (I'm using my Mac, but FreeBSD or Linux will work as well) and have some command line knowledge. I cannot help you if you don't know your way through the shell and development tools.
Enjoy, Hans ([email protected])