AdventOfCode/Advent Of Code Library/2022/Day 02/Day02Part1.cs

21 lines
562 B
C#

namespace AdventOfCodeLibrary._2022
{
using AdventOfCodeLibrary._2022.Day02;
using AdventOfCodeLibrary.Shared;
public class Day02Part1 : IAnswerable
{
public int Year { get; set; } = 2022;
public int Day { get; set; } = 2;
public int Part { get; set; } = 1;
public string GetAwner(byte[] data)
{
GameRules.BuildScoreDic();
return ByteHelper.GetAsStringArray(data)
.Select(GameRules.GetScore)
.Sum()
.ToString();
}
}
}