Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

World-Smallest-Checkers-Engine

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.

Features

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.

How to Play:

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.

Code Explanation

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.

License

This project is licensed under the Apache License. See the LICENSE file for more details.

Contact

If you have any questions or suggestions, feel free to reach out to the maintainer:

GitHub: Nicholas-afk

About

This repository contains the world's smallest checkers engine implemented in Python. The engine is designed to be compact and efficient, making it perfect as a foundation for more complex checkers games.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages