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.
- 5x5 playable game grid
- Mouse click interaction
- Randomized shape placement
- Matching system
- Hidden/revealed objects
- Multiple primitive shapes using Allegro
- Modular programming structure
- C++
- Allegro 5
- Microsoft Visual Studio
- GitHub for version control
main.cpp→ Runs the game loop and event handlinggame.h / game.cpp→ Game logic and board managementgraphics.h / graphics.cpp→ Drawing functions for shapes and visuals
- Open the solution in Visual Studio.
- Make sure Allegro 5 dependencies are installed.
- Build the project in Debug x64 or Release x64.
- Run the executable.
- Mouse Click → Select and reveal boxes
- Match pairs to clear the board.
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
Joel Adu
CPSC 440 – Summer 2026