20 lines
551 B
C#
20 lines
551 B
C#
using AdventOfCode.Solutions._2022.Day02;
|
|
|
|
namespace AdventOfCode.Solutions._2022
|
|
{
|
|
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();
|
|
}
|
|
}
|
|
} |