Skip to main content

Checkers implementation in python based on the international draughts

Project description

🏁 Checkers Implementation in Python

Built within the pygame framework as a university project

Table of Contents

  • Introduction
  • Features
  • Installation
  • Usage
  • Contact Info
  • Dependancies
  • References

Introduction

This package is an implementation of the well known checkers board game, and the rules are based on the international draughts guidelines. The checkers-main package consists of 2 modules utility and game each responsible for handling thier respective features for the game. This is my first time creating a project of this scale using pygame.

Features

  • Graphical User Interface
  • Multiplayer Mode: Play 1v1 with a second player
  • Save and Load Games: Your previous game is auto-saved upon quitting
  • Checker Rule Implementation: Game rules are based on international checkers guidelines

Installation

Installation from GitHub

To install the application:

Create project directory(In Terminal)

mkdir checkers-imp-adv-coding-proj-techscreed

Enter directory(In Terminal)

cd checkers-imp-adv-coding-proj-techscreed

Clone repository(In Terminal)

git clone https://github.com/ScreedVA/checkers-imp-adv-coding-proj.git

Move into repository directory(In Terminal)

cd checkers-imp-adv-coding-proj

Create virtual environment (In Terminal)

python -m venv .venv

Activate virtual environment (In Terminal)

.venv\Scripts\activate

Update pip if nessasary (In Terminal)

python.exe -m pip install --upgrade pip

Install package dependancies (In Terminal)

pip install -r requirements.txt

Installation from Pypi

Create project directory (In Terminal)

mkdir checkers-imp-adv-coding-proj-techscreed

Enter directory (In Terminal)

cd checkers-imp-adv-coding-proj-techscreed

Create virtual environment(In Terminal)

python -m venv .venv

Activate virtual environment(In Terminal)

.venv\Scripts\activate

Install package from Pypi(In Terminal)

pip install checkers-imp-adv-coding-proj

Usage - After Installed with Pypi

There are 2 ways you can run this package

Example 1 Running package with CLI Command

Run application (In Terminal)

run_checkers_round

Output: You have no previous games, Starting round...

Example 2 Running package through execution file

Create project directory (In Terminal)

mkdir checkers-imp-adv-coding-proj-techscreed

Enter project directory (In Terminal)

cd checkers-imp-adv-coding-proj-techscreed

Create file for execution and import main from checkers-main package (In Terminal)

echo > main.py "from checkers_main import main"

Call main function in main.py (In Script)

if __name__ == "__main__":
    main()

Run application execution file (In Terminal)

python main.py

Usage - After Installed from GitHub

Example 1 Running package through execution file

Enter repository directory if not already (In Terminal)

cd checkers-imp-adv-coding-proj

Run application execution file (In Terminal)

python main.py

Output: You have no previous games, Starting round...

Example 2 Installing and Running Package locally with Egg files

Enter repository directory if not already (In Terminal)

cd checkers-imp-adv-coding-proj

Install package locally (In Terminal)

pip install -e .

Run package locally with CLI command(In Terminal)

run_checkers_round

Contact Info

LinkedIn Profile

Dependancies

  • Pygame Framework handles graphical user interface functionality
  • Pillow Library is used for image manupluation and cropping
  • Json libary handles python dictionary to json serialization

References

  • The render_game_env() method which utilizes modular congruences to asses rows and columns to draw evenly positioned squares is inspired from an article by Sundar Sing - Singh, S. (2017, December 10). D3: Modulo operation to create a grid.

  • The game images used throughout the project are by "andi" on OpenGameart.ORG

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

checkers_imp_adv_coding_proj-0.2.0.tar.gz (36.6 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file checkers_imp_adv_coding_proj-0.2.0.tar.gz.

File metadata

File hashes

Hashes for checkers_imp_adv_coding_proj-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2f97fd73428bc5eaedd24bb29c8910a45e33abc73d173e473e67456d626d9873
MD5 61e03d6b39a07ed9862cbcc11a1387be
BLAKE2b-256 480bb342bc05535f3bbf2a4b741eaef17c688ed42948bdb11607d8a8a530a2fb

See more details on using hashes here.

File details

Details for the file checkers_imp_adv_coding_proj-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for checkers_imp_adv_coding_proj-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5b7f6176c8f1397e54a4b94f51c0a100ea96cb5fdb7f488c72630691f3384738
MD5 bf1a91a94ca2b4ee1f5dbb58ffe9d9c4
BLAKE2b-256 28d165c190d0418e727e49718dae018a208291429f21fdf66a00653cfdfc3a76

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page