Welcome to the repository for the world's smallest checkers engine! This project is a minimalistic implementation of the classic board game international checkers (also known as draughts). The engine is written in Python and is designed to be as compact as possible while still being functional.
Compact Code: The entire checkers engine is implemented in a few lines of Python code. Basic Gameplay: Supports basic checkers moves and captures. Simple Interface: Uses a text-based interface for input and output.
Clone the Repository:
git clone https://github.com/yourusername/smallest-checkers-engine.git cd smallest-checkers-engine
Run the Game:
python checkers.py Input Moves:
Enter your move in the format XY XY, where XY represents the coordinates of the piece you want to move and the destination. For example, to move a piece from A2 to B3, you would input 1223.
The code is designed to be as compact as possible. Here's a brief explanation of the key components:
Board Initialization: The board is initialized with the pieces in their starting positions. Move Validation: The v function handles moving pieces and capturing opponent pieces. Move Generation: The g function generates valid moves for a given piece. Game Loop: The main loop displays the board, takes user input, and updates the board state.
This project is licensed under the Apache License. See the LICENSE file for more details.
If you have any questions or suggestions, feel free to reach out to the maintainer:
GitHub: Nicholas-afk