Skip to content

Neil-001/advanced-topics

Repository files navigation

Advanced Topics in Programming 2024/25 @ TAU

License: MIT


Monorepo containing my implementations to all assignments in the course "Advanced Topics in Programming" (C++) at Tel Aviv University.

Overview

The main project for this semester was to develop a game, incrementally improving it with each assignment. Each assignment is preserved in its own branch, while the main branch contains the final version.

Prerequisites

  • CMake 3.26 or higher
  • A C++20 compatible compiler (GCC, Clang, or MSVC)
  • Python 3.7 or higher (optional, for the visualization script in Assignments 1 and 2)

Building & Running the Project

Assignments 1 and 2 (tanks_game)

cmake -S . -B build
cmake --build build

After building, you can run the tanks_game executable in the source directory. Unit tests are built as the tanks_tests executable, using GTest (included as a submodule).

Simulator (Assignment 3)

This repository also contains a dynamically loaded Simulator used to run comparative and competition modes against shared libraries (algorithms and a game manager). It is self-contained and built with simple Makefiles.

Build all components:

make           # builds Simulator, Algorithm, and GameManager

Or build individually:

make -C Algorithm
make -C GameManager
make -C Simulator

Run comparative mode (single map, all game managers in folder, two algorithms):

./Simulator/simulator_01 \
  -comparative \
  game_map=<game_map_filename> game_managers_folder=<game_managers_folder> \
  algorithm1=<algorithm_so_filename> algorithm2=<algorithm_so_filename> \
  [num_threads=<num>] [-verbose]

Run competition mode (multiple maps, single game manager .so, all algorithms in folder):

./Simulator/simulator_01 \
  -competition \
  game_maps_folder=<game_maps_folder> game_manager=<game_manager_so_filename> \
  algorithms_folder=<algorithms_folder> [num_threads=<num>] [-verbose]

The tests are built using CMake, which automatically fetches GTest:

cmake -S tests -B tests/build
cmake --build tests/build -j$(nproc)

To run the tests, use:

ctest --test-dir tests/build --output-on-failure

The tests run the simulator in the verbose mode, for debugging purposes. To easily delete the output files, you can use the included clean_output.sh script, or use the build_and_test.sh script, which builds the project, the tests, and runs them.

Visualization (Assignments 1 and 2)

To run the visualization script, first install the required Python packages:

pip install -r visualizer/requirements.txt

Then, run the visualization script:

python visualizer/visualizer.py <log_file_name>

Contributing

Although the assignments have already been submitted, your feedback, bug reports, or improvements are most welcome.

License

This project is distributed under the MIT License. See the LICENSE file for more information.

About

Advanced Topics in Programming (C++) 2025B @ TAU

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages