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

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for checkers_imp_adv_coding_proj-0.1.9.tar.gz
Algorithm Hash digest
SHA256 6a92a251302ef5c14430a865c6289adb0092ee02e52f82a3f3b1be8ff0b663fd
MD5 8798f8c447a44afc7a15e53f4057fed0
BLAKE2b-256 5fc394918acd34fc1d28f53641485ae3078249cf9533247be637e8d518c2d162

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for checkers_imp_adv_coding_proj-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 ea251561e44f69050db49e12661c6cb4064c7d1254b8ba3a855a72acea144fa6
MD5 7fc483cbc28ceb31b54a38e21d8feba9
BLAKE2b-256 da0211e3c343b3d8e20829f70ad5721b581137409cc11df225e7fb2932f0b8b6

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