Skip to content

alecswift/checkers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Checkers

About

I developed a checkers game in python, with pygame for the user interface, to practice object oriented programming and utilize algorithms for a practical purpose. Currently you can play checkers in the terminal or with your favorite IDE against an intermediate level AI implemented with a minimax algorithm and heuristic functions that evaluate the game state based on the number of captured pieces and the number of king pieces. I chose checkers as it's an easily expandable project. I plan to code more levels of AI, deploy the project as an app on the internet, support 1v1 play over a network, create a database to store game results, and use what I've learned to develop a chess game.

Rules

I used the classic checkers rules. Each piece can move exactly one diagonal if there is no capture. If there is a capture available the player must make the move that captures the most pieces. Pieces are promoted to kings when they cross the entire board and then can move diagonally forward and backward. The game ends when one of the players has no available moves. See here for the detailed rules.

Usage

  1. Install python and the pygames library

  2. Clone the repository:

    git clone https://github.com/your_username_/checkers.git

  3. Access the folder in the terminal or your favorite IDE

  4. Run the play_checkers.py file

  5. Voila! You're playing checkers

Built With

Python and the pygame library for the graphical user interface and game loop

Contributing

Feel free to contribute! If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Thanks!

Fork the Project
Create your Feature Branch (git checkout -b feature/AmazingFeature)
Commit your Changes (git commit -m 'Add some AmazingFeature')
Push to the Branch (git push origin feature/AmazingFeature)
Open a Pull Request

Contact

[email protected]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages