tamaroth / advent-of-code-2018

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Solution table

Day Name C++ Python
01 Chronal Calibration ✔️
02 Inventory Management System ✔️
03 No Matter How You Slice It ✔️
04 Repose Record ✔️
05 Alchemical Reduction ✔️
06 Chronal Coordinates ✔️
07 The Sum of Its Parts ✔️

Building C++

To build the code you will need:

Follow the steps:

  • from within terminal, go to a directory you wish to contain the code. (e.g. cd ~/code)
  • clone the repo: git clone https://github.com/tamaroth/advent-of-code-2018.git
  • enter the repo: cd advent-of-code-2018
  • create build directory: mkdir build
  • enter build directory: cd build
  • run cmake: cmake ..
  • run make: make -j
  • to run the solutions: ./advent/advent
  • to run the tests: ./advent/advent tests

Running Python code

You will need Python 3.7 and then you can simply run:

  • ./setup.sh to install all necessary packages (on windows just install the missing ones when you run the script).
  • run ./python/aoc.py test to run tests
  • run ./python/aoc.py solve all to run all solutions
  • run ./python/aoc.py solve X to run a solution for the specific day, where X is that day's number, e.g. 6

About

License:MIT License


Languages

Language:Python 55.6%Language:C++ 27.0%Language:CMake 14.9%Language:Shell 2.5%