Skip to content

uliseshdzc/advent-of-code-2021

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code 2021

This repository contains the code for the practice challenges for the Advent of Code. I used C#8.0 to through all of them and Visual Studio 2022 as the IDE.

How to run the solution

The solution is organized by projects. There is library one project called Common which contains an Utils class to retrieve the input data directly from the Advent od Code website. It is required to have an appsettings.json file with the following arguments:

{
  "Year": 2021,
  "SessionCookie": SESSION_COOKIE_VALUE
}

To get the SESSION_COOKIE_VALUE:

  1. Login on Advent of Code with your account. Open your browser’s developer console. This is usually done by right-clicking on the page and selecting “Inspect” or "Inspect Element".
  2. Navigate to the Network tab in the developer console.
  3. Refresh the page or navigate to any input page, such as https://adventofcode.com/2021/day/1/input.
  4. In the list of network requests, click on the request for the page you just loaded. This will open a panel with details about the request.
  5. Look for the “Cookie” header in the request headers section. The value of this header is your session cookie.

The rest of the projects are named with the format Day00, according to the challenge day. They are console projects that may be launched directly from the IDE or using:

dotnet run --project NAME_OF_PROJECT

Note

The .NET CLI must be installed to run the previous command.

About

Practice using challenges of Advent of Code 2022

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages