Back to Projects

Checkers Game

A desktop Checkers game built in C with a GTK+ graphical interface, featuring single-player AI, two-player, and AI vs AI modes.

2023

Duration

Mar 2023 – May 2023

Team Size

2 people

Technologies

4+ tech

CG

Checkers Game

Project Overview

Developed as a systems programming project, this desktop Checkers game is built with C and the GTK+ graphical toolkit. It implements the full Checkers ruleset with multiple play modes: single-player against an AI opponent, two-player on the same machine, and an AI vs AI spectator mode. The AI uses a minimax algorithm with varying depth for difficulty scaling.

Features

  • Classic Checkers gameplay with full rule enforcement — captures, kings, and forced moves
  • Single-player mode against an AI opponent
  • Two-player mode for competitive local play
  • AI vs AI spectator mode for automated gameplay
  • Varying AI difficulty levels using minimax with adjustable search depth
  • Rich GTK+ graphical interface with board rendering and piece animations

Challenges

  • Implementing a correct and complete Checkers rule engine in C
  • Building a minimax AI that remains responsive at higher difficulty levels
  • Rendering an interactive game board with GTK+ drawing area and event callbacks

Solution

Modeled the board as a 2D array with bitfield flags for piece state. Minimax with alpha-beta pruning keeps the AI responsive at deeper search depths. GTK+ drawing area widget handles all board rendering with mouse event callbacks.

Architecture

Single-process desktop application. A game state struct holds the board, current turn, and scores. GTK+ event callbacks mutate game state and trigger redraws. The AI module runs minimax independently and returns the best move.

Results & Impact

  • Fully playable Checkers game with all standard rules enforced
  • AI provides a genuine challenge at higher difficulty settings
  • GTK+ interface delivers a native desktop experience on Linux
Technologies

Frontend

GTK+

Backend

C (game logic, AI)

Database

Tools

GCCMakeGit
Team
  • Ismail ZAHIR
  • Yasser TRIDOU
License
MIT

Free to use, modify, and distribute with attribution.

Project Tags
CGTK+AlgorithmsData Structures

More Projects

NexoWorld
2024
An AR mobile game where players explore real-world locations to earn in-app currency and complete challenges — built on a Spring Boot microservices backend with real-time location sync.
Spring BootFlutterMongoDB+5
Kolchi.ma
2024
A full-featured Moroccan e-commerce and repair marketplace connecting buyers, sellers, and service providers on a polyglot microservices platform with real-time messaging.
DotNet CoreSpring BootNestJS+6