Skip to content

Repository files navigation

CPSC440 Memory Game

Overview

This project is a Memory Matching Game created in C++ using the Allegro 5 graphics library for CPSC 440.

The game uses a 5x5 grid where players click boxes to reveal hidden shapes and attempt to match pairs. Shapes are randomly generated and placed each time the game starts.

Features

  • 5x5 playable game grid
  • Mouse click interaction
  • Randomized shape placement
  • Matching system
  • Hidden/revealed objects
  • Multiple primitive shapes using Allegro
  • Modular programming structure

Technologies Used

  • C++
  • Allegro 5
  • Microsoft Visual Studio
  • GitHub for version control

File Structure

Main Files

  • main.cpp → Runs the game loop and event handling
  • game.h / game.cpp → Game logic and board management
  • graphics.h / graphics.cpp → Drawing functions for shapes and visuals

How to Run

  1. Open the solution in Visual Studio.
  2. Make sure Allegro 5 dependencies are installed.
  3. Build the project in Debug x64 or Release x64.
  4. Run the executable.

Controls

  • Mouse Click → Select and reveal boxes
  • Match pairs to clear the board.

Assignment Goals

This project demonstrates:

  • Modular programming in C++
  • 2D graphics using Allegro
  • Event-driven programming
  • Mouse input handling
  • Arrays and game state management
  • Object comparison and matching logic

Author

Joel Adu
CPSC 440 – Summer 2026

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages