Skip to content

FailedCode/adventofcode-2018

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code 2018

http://adventofcode.com/2018

Solutions with PHP 7.2

Features

  • Download Input of the day
    • Doesn't override already existing files!
  • Test mode
    • Tweak the Puzzle code while making sure the solution doesn't get lost

Install

composer install

composer???

In case you do not have curl installed:

sudo apt-get install php-curl

In case you do not have curl installed:

sudo apt-get install php-xml

Copy the .env.dist file

cp .env.dist .env

Insert your SESSION cookie for automated download of your personal puzzle input.

Copy the testvalues.php.dist file

cp Days/testvalues.php.dist Days/testvalues.php

testvalues.php ist used for refactoring. Known puzzle solutions are tested against to tell if a change broke the code.

Run

./runDay.php 1

Run a day.

./runDay.php 1 2 3

Runs multiple days.

./runDay.php 2p2

Runs only the second part of day 2.

./runDay.php 2 --test

Tests, if the results for day 2 changed.

./runDay.php 2 --psr2-check

Check code for PSR-2 violations

Resources

Releases

No releases published

Packages

 
 
 

Contributors

Languages