This repository contains the fourth practical assignment for the course Algorithms and Data Structures II at the University of Buenos Aires (UBA), Faculty of Exact and Natural Sciences, completed during the first semester of 2021.
The project implements the core game logic and data structures for a Pacman-inspired simulation in C++, based on a modular design defined in a previous assignment (TP3).
The goal of this assignment was to:
- Implement all modules from the TP3 design in C++
- Ensure each module meets complexity requirements
- Respect the given module interfaces, adapting them to the course's test framework
- Organize the project using a modular structure with
.cpp
,.h
, and.hpp
files - Integrate a graphical user interface (GUI)
- Modular programming in C++
- Abstract Data Types (ADTs)
- STL containers (
std::list
,std::stack
,std::map
, etc.) - Template programming (
.hpp
files) - Interface adaptation and façade patterns
- Algorithmic complexity management
📁 src/
├── Fichin.hpp / Fichin.cpp # Implementation of the main game logic
├── aed2_Fichin.hpp / .cpp # Interface wrapper for integration/testing
├── Tipos.h # Definitions of Coordenada, Direccion, etc.
📁 tests/
├── Unit tests and integration tests
📄 CMakeLists.txt # Build configuration
📄 enunciado.pdf # Original assignment description (in Spanish)
This project uses CMake. You’ll need:
- A C++ compiler (e.g.,
g++
) - CMake 3.10+ installed
Steps to build:
mkdir build
cd build
cmake ..
make
💡 The graphical interface is supported only on Linux and includes separate build instructions at the end of this README.
- 📘 Course: Algoritmos y Estructuras de Datos II
- 🏛️ University: Universidad de Buenos Aires, Facultad de Ciencias Exactas y Naturales
- 📅 Term: 1st semester of 2021
- 🧑💻 Language: C++
aed2_Fichin
acts only as a façade. All game logic resides in your ownFichin
class.- STL containers were used to model fundamental ADTs (list, stack, queue, map, set).
- Code adheres to complexity and memory safety constraints defined in TP3 and the assignment statement.
This project is intended for academic and educational purposes only.
Do not reuse without appropriate attribution.
Compilación:
mkdir build
cd build
cmake ..
make
Ejecución (desde el inicio del proyecto):
cd build/
./correrTests
Se necesitan dependencias que pueden ser instaladas en Ubuntu corriendo el siguiente comando en una terminal:
sudo apt install libsdl2-dev
Las instrucciones no están probadas en Mac OS pero pueden funcionar. Para
Windows, se puede probar instalando la dependencia como se indica arriba dentro
del WSL. En caso de usar Mingw, es necesario instalar la dependencia
libsdl2-dev
usando la herramienta de dependencias.
Otra opción en Windows (usando MinGW) es descargar SDL desde: https://www.libsdl.org/download-2.0.php (En la sección "Development Libraries:" -> "Windows:" -> "SDL2-devel-2.0.14-mingw.tar.gz (MinGW 32/64-bit)") Luego descomprimir los archivos descargados y copiarlos en la carpeta de instalación de MinGW.
Compilación:
Si ya se creó la carpeta build
, es necesario borrarla:
`rm -r build`
Luego:
mkdir build
cd build
cmake ..
make
Desde el inicio del proyecto:
cd build/
./pacalgo2GUI
En caso de encontrase con errores al hacer cmake ..
refiriendo a no encontrar el archivo FindSDL2.cmake
, puede probarse el proceso anterior luego de descomentar la línea 28 del archivo CMakeLists.txt
.