Checkers Game and Bot
Mar 2023 - Jun 2023
Chicago, IL
Introduction
This project is a complete implementation of the classic Checkers game, providing multiple ways for players to interact, from a simple text-based interface to a rich graphical experience. The project is designed to be modular, allowing different components—such as the game logic, user interfaces, and even computer-controlled players—to work together seamlessly.
The game is suitable for both beginners looking to learn Checkers and developers interested in understanding how different programming concepts come together to create a fully functional game.
Project Components
1. Core Game Logic
The foundation of this project is the core logic, which manages the rules and flow of the game.
The core includes the main classes:
- Player: Represents each player in the game, including their color and possible moves.
- Piece: Represents each checkers piece on the board, with properties for player ownership and king status.
- Board: Defines the Checkers board, manages piece placement and position checking.
- Game: Contains all rules, manages turns, and determines game end conditions.
2. User Interfaces
Text User Interface (TUI)
- Simple command-line interaction
- Text-based board display
- Coordinate-based move input
- Clear feedback on game state and available moves
Graphical User Interface (GUI)
- Visual board representation using pygame
- Click-based piece selection and movement
- Highlighted valid moves
- Visual feedback for piece promotion and captures
3. Bots for Automated Play
- RandomBot: Makes random moves from available legal options
- SmarterBot: Uses basic strategy to avoid immediate piece capture
Game Features
- Customizable board size with variable piece rows
- Diagonal movement and piece capture mechanics
- King promotion system
- Multiple play modes (human vs. human, human vs. bot, bot vs. bot)
How the Game Works
- Setup: Players choose board size and initial piece configuration
- Gameplay: Alternating turns with move validation and capture enforcement
- Winning: Game ends when one player captures all pieces or no legal moves remain
Technical Highlights
- Object-oriented design with clear class separation
- Modular architecture separating game logic from interfaces
- Extensible design allowing easy addition of new features
Areas for Improvement
- Enhanced AI implementation using machine learning or advanced heuristics
- Improved GUI features including animations and better notifications
- More robust error handling for user inputs
Conclusion
The Checkers game project demonstrates a comprehensive implementation of a classic board game, featuring multiple interface options and AI opponents. It serves as both an entertaining game and a showcase of software development principles including modularity, object-oriented programming, and interface design.