Skip to content

PatatalouiS/ScrabbleSolver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

⚠️ Please read entirely the Instructions for build the project and be aware of all the available options ️⚠️

Documentation

All the full documentation of the code is available with the doxygen tool. If you don't have this tool, installing it is very simple, just do :

$ sudo apt install doxygen       //On Debian/Ubuntu Unix-like system
$ brew install doxygen           //On OSX system

After making sure you have this tool, just do :

$ make doc

With this, all the documentation will be generated in the doc/ folder. Now, you can easily access it by openning the file doc/html/index.html

Build

This project can be build on Unix and OSX Systems.

This project use a lot of C++17 features and must be build with a recent compiler. So please ensure you have :

  • GCC v8.3.0 or latest
  • Clang v11.0.0 or latest

After cloning or downloading the project, in the root of projet just do :

$ make

If all is OK, you should see an executable file named ScrabbleSolver in the bin/ directory.

You can remove all the obj files created with :

$ make clean

Or remove all executables and obj files ( to retry a fail build for example ) with :

$ make superclean 

Available options

Three options are available with command line args :

  • --loop: Run a loop wich will successively resolve an empty scrabble board until no letters are available or that no move is playable. Just press ENTER Key to see the next best move.

  • --jokers : Enable the use of jokers. Jokers are represented by '?' symbol in the file config_board.txt

  • --suzette-check : Emit a query to the Suzette Bot of Mr Nivoliers for each move played and display to console. It's a good way for you to check the correctness of our software. You must execute a little bash script named suzetteconnect.sh to pass the University Firewall and allow the proper functioning of this option.

⚠️ Activation of the --suzette-check option

As explained, you must pass the Firewall of UCBL1 to keep the Suzette asserts working. If you are already physically on the University campus, you don't need to run the script. Else, just run the script suzetteconnect.sh, ( and don't forget to pass tour UCLB1 login at first arg ) on another console window. After, you can use --suzette-check as you want. run this script from the root of the project with the command:
$ sh suzetteconnect.sh [p1234567]  //Your UCBL1 login

This script is going to ask you a password for authenticate you at UCBL. The password to enter is your UCBL1 password. The script will not return, it's normal ! kill the process once you no longer need the option --suzette-check

⚠️ Warning

The --jokers option and the --suzette-check option are not compatible together. Indeed, The Suzette Server can't play with jokers actually. You will be prompt by the software if you put these two options together.

Run

⚠ All the executions must be run from the root of the project ⚠️

To run the Solver without any options, just ensure you are at the root of project and do :
$ ./bin/ScrabbleSolver

Without any options, the program load prints the enabled options, wait for ENTER Key, then loads the Configuration written in the file data/config_board.txt, shows the basic configuration and prints the best move for this configuration.

Options can be combinated together, for example if you run :

$ ./bin/ScrabbleSolver --loop --suzette-check

So, the loop will be executed with a Suzette check for all moves will be computed

The config file data/config_board.txt must respect the following conventions, you can edit it for solve all the configurations you want to test. if the --jokers option is enabled, you can add a joker to the 7 letters availables of the player by putting the '?' symbol (Maximum 2 jokers are allowed):

...............
...............
...............
...............
...............
...............
...............
....PROJET.....
.......O.......
.......U.......
.......E.......
.......U.......
.....SCRABBLE..
...............
...............
AEBDECZ          // letters of the player, can contains 1 or 2 '?' symbols of joker

Third Party Libraries

Especially for the --suzette-check option, we used httplib to send Queries to the Suzette server with an hhtp client and nlohmannjson to parse the JSON query result easily. These to libraries are HTTP-header only, you don't need to install or download it.

Contact

If you have any problems for building or using certain options, please contact us : SUPPORT

Authors

  • CERBULEAN Ana-Maria P1710179
  • OLIVIE Maxime P1712754

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages