Package: pytictacbot
TictacbotA program that makes you unbeatable atBombParty(in french).DisclaimerI developed this program because I wanted to challenge myself with code and found it fun to try to create a bot that could follow the rules of the game perfectly.It's not meant to be used to ruin other players' games: for my part, I used it to amaze and make my friends laugh during our private games.Anyway, I doubt that many people find much interest in cheating on a simple board game without much at stake.Installation⚠️ This program requires a version ofpython>= 3 installed on your machine.Install thepytictacbotmodule usingpip(it is included with python):pipinstallpytictacbotUsageIn order for this program to work, you must grant access toAccessibilityandInput Monitoringto the application that will run the script. Indeed, the program need access to listen to the keys you type.On Mac:OpenSystem settings,Navigate into thePrivacy & Securitysection,Click onAccessibility,Allow the application(s) in which you will run the script (ex: Terminal, iTerm...),Go back, then do the same thing forInput Monitoring.Once this is done, it is ready to use !In your terminal, run:tictacbotAn interface will be displayed. It will listen to the keys you type. A history of these keys will be displayed on the interface.To launch the search,press the space bar.To cancel the keys you typed,press the escape key.To quit,press control+c.After a successful search, the found word will be automatically pasted. Theremaining letterslist will be updated accordingly.RulesBefore understanding how does it work, let's remember the rules of thejklm.fun's BombParty:The player will be given a series of letters. He have to find (as quickly as possible) a word that contains this series of letters(ex: "iso" -> "maison")The player can't reuse a word that has already been used during the game.The player starts with a list of all the letters in the alphabet, except "k", "w", "x", "y" and "z". If, with the words he/she types during the game, the player manages to use all these letters at least once, then the player will gain an extra life.Finally, the goal in each round would be to find a word containing the sequence of letters, that has not been used already, but also the one that will unlock the most letters at once!How does it work ?Once the script is launched, it will run in the background, listening to the keys that are typed on the keyboard.It will display everything on the interface to make it easier for the user to understand what is happening in the background.When the user will press escape to search the best word including the sequence of letters he/she typed,Tictacbotwill crawl a file containing all the words of the French language.It will first determine a list of all words containing the given sequence of letters.
Then, it will crawl this list and, for each word, calculate a score using the letters to discover (cf. 3rd rule). At the end, it will return the word with the highest possible score.Finally, it will erase the sequence of letters that has ben typed by the user and paste the word instead.TODO'sHandling this case: Currently, the program does not remain the words that has been used by the other players (only those that the player himself used). This can sometimes result in the reuse of an already used word (cf. 2nd rule).Refining the source: In rare cases, a word retrieved byTictacbotmay not be accepted in the game. In this case, manually remove the word fromthe source file.Manage all environments: Adapt the keyboard shortcuts to the user's operating system.