21 lines
587 B
C#
21 lines
587 B
C#
namespace AdventOfCodeLibrary._2022
|
|
{
|
|
using AdventOfCodeLibrary._2022.Day02;
|
|
using AdventOfCodeLibrary.Shared;
|
|
|
|
public class Day02Part1 : Answerable
|
|
{
|
|
public override int Year { get; set; } = 2022;
|
|
public override int Day { get; set; } = 2;
|
|
public override int Part { get; set; } = 1;
|
|
|
|
public override string GetAnswer(byte[] data)
|
|
{
|
|
GameRules.BuildScoreDic();
|
|
return GetAsStringArray(data)
|
|
.Select(GameRules.GetScore)
|
|
.Sum()
|
|
.ToString();
|
|
}
|
|
}
|
|
} |