Skip to content

jccabrejas/advent-of-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code

This is my repository for my Advent of Code solutions. The framework is a clone of David Brownman´s.

Quickstart

This repo has two main executables: start and advent. See David´s repo for instructions. The only difference is that I added an additional argument so that I can specify the input file. Now I can either run test.txt or input.txt

Usage

`./advent [-h] [--year year] [--file filename.txt]

Run a day of Advent of Code

positional arguments:

  • day (required): Which puzzle day to run

optional arguments:

  • --year YEAR (optional): Puzzle year. Defaults to current year if December has begun, otherwise previous year
  • --file (optional): specify the input file to be used

Examples

  • ./advent 2
  • `./advent 5 --year 2020 --file test.txt
  • ./advent 5 --year 2015 --file input.txt

Reading Input

AoC input takes a number of forms, so there are a number of simple modes in which input can be read. Pick a mode by setting Solution.input_type to one of the following Enum values:

InputTypes.X description input for this mode
TEXT one solid block of text; the default abcde
INTEGER one number 12345
TSV tab-separated values a b c
d e f
STRSPLIT str[], split by a specified separator (default newline) a
b
c
d
e
INTSPLIT int[], split by a specified separator (default newline) 1
2
3
4
5

Specify Solution.separator to control how the SPLIT methods separate their input.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages