Conversation
- Update test.txt to change the content from "subscribe" to "JUST KILLING IT". - Update .gitignore to include the .env file.
This commit refactors the game playing logic in the `main` function of `api.py` to improve readability and maintainability. It also adds a new feature to allow one of the bots to resign the game after all moves are played. The `resign_game` function is implemented to handle the resignation process. Additionally, the commit includes the creation of a game link and the optional export of the PGN (Portable Game Notation) of the completed game.
|
Hello! I want to use Your Fork, but as Python newbie I've faced with some problems like:
*[PRIVATEPATH] has Unicode Characters, if that information can help. More than 75% that I just don't know how to proper search things... but may be You will help Me. I'll be glad to that. almost two full days after |
Project Files
bot-upgrade.pyThis script allows you to upgrade a regular Lichess account into a bot account. The
upgrade_to_bot_accountfunction sends a POST request to the Lichess API to convert the account to a bot.upgrade_to_bot_account(api_token: str): Upgrades a Lichess account to a bot account using the provided API token.Source file: bot-upgrade.py
create_chess_video.pyThis script generates a video replay of a chess game based on a PGN file. It uses Pygame to create frames of the chessboard, saving each as an image, and then uses
ffmpegto compile these images into a video.ffmpeg.Source file: create_chess_video.py
decode.pyThis script decodes a file that has been encoded into PGN-formatted chess games. The
decodefunction reads a PGN string, decodes the binary data from chess moves, and reconstructs the original file.decode(pgn_string: str, output_file_path: str): Decodes a file from a PGN string and writes it to the output file path.run_decoder(): CLI interface for decoding PGN games to files.Source file: decode.py
encode.pyThis script encodes a file into a series of chess games stored in PGN format. It reads the binary data from a file, converts it into chess moves, and stores the moves as PGN games.
encode(file_path: str): Encodes a file into chess games in PGN format.run_encoder(): CLI interface for encoding files to PGN format.Source file: encode.py
api.pyThis script automates chess matches between two Lichess bot accounts. It includes functions for challenging a bot, accepting a challenge, and playing a sequence of predefined PGN moves between two bots.
Source file: api.py
Special Thanks