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 manipluation 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.2.tar.gz (36.6 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file checkers-imp-adv-coding-proj-0.2.2.tar.gz.

File metadata

File hashes

Hashes for checkers-imp-adv-coding-proj-0.2.2.tar.gz
Algorithm Hash digest
SHA256 9996aa64fe8cbf637f19c4705723f92ee493f557c435cf9ffa423597ae92b225
MD5 d968b0e1316e3fb2eeaee6728ef0f533
BLAKE2b-256 ba9dbd9db9d01b6033c841e250a5059b26f06d274822ebb99a417527b7fcbe8e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for checkers_imp_adv_coding_proj-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d4bab9d244fb8aef1c486ab5bf502bdd481b08a18039f95e63609e552dd80c8d
MD5 1085e7b7292232d9a8e3d2d33633e7e9
BLAKE2b-256 49396d7dcd02d1a64727cb852dae07d462b72cc3d7c119965a7d821438cb679e

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