Skip to content

Python terminal Checkers with full move validation, captures, king logic, and a basic AI that prioritizes jumps. Built with a structured architecture and tests.

Notifications You must be signed in to change notification settings

unteajessica/Checkers-Console-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Console Checkers Game with Rule Engine & Simple AI (Python)

A console-based Checkers game built in Python to explore how to design a clean game engine: board state management, move validation, captures, king promotion, and a simple computer opponent. The project is structured with a clear separation between domain logic, services, and UI, and includes custom exceptions and unit tests.


Features

  • 8x8 board initialization with standard Checkers setup
  • Move validation (diagonal movement, bounds checking, empty destination)
  • Capture logic (jump moves remove opponent piece)
  • King promotion for both players
  • Console UI with colored pieces (Human vs Computer)
  • Simple AI opponent that prioritizes capturing moves (jumps) before normal moves
  • Unit tests for core board behavior

Architecture

  • Domain (game/domain): board representation + rules (valid moves, captures, game-over logic)
  • Service (game/service): orchestrates turns and applies rules for Human/Computer players
  • UI (game/ui): console interaction layer (input/output)
  • Exceptions (game/exceptions): domain-specific errors for invalid moves and ownership

This separation keeps game rules testable and independent from the UI.


Tech Stack

  • Python 3
  • texttable for rendering the board
  • colorama for terminal coloring
  • unittest for automated testing

About

Python terminal Checkers with full move validation, captures, king logic, and a basic AI that prioritizes jumps. Built with a structured architecture and tests.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages