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 locally (In Terminal)

pip install -e .

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 2 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...

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.1.6.tar.gz (36.3 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for checkers_imp_adv_coding_proj-0.1.6.tar.gz
Algorithm Hash digest
SHA256 20b12e70126285a5369bea18a28abaa0f5a2fbff49748c569a7a16e22db38800
MD5 8d9a1a1e1f8a052f113aac2a05931267
BLAKE2b-256 0ab0a63ab88e357c2a096d2d23bba65b98918f40f6b3cc611051ad459abbb3d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for checkers_imp_adv_coding_proj-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e6c3bfd296685fb01bf7e59cbaf456e449686abce67ac526fb0bbadef3317e82
MD5 af7af77b4c0c12496a60380a1aa86afa
BLAKE2b-256 452a409219d28a2bae2e0f1519e45cdcf030928f2c3f63c673ea460ce97b63ef

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