Code formatting and warning fixing.

This commit is contained in:
2024-12-01 17:36:23 +01:00
parent 9f8d966b7a
commit dafd2526d1
93 changed files with 739 additions and 823 deletions

View File

@@ -114,9 +114,9 @@ public class Day07 : IDay
public class CamelCard
{
private readonly static char[] Labels = { 'A', 'K', 'Q', 'J', 'T', '9', '8', '7', '6', '5', '4', '3', '2' };
private readonly static char[] Labels = ['A', 'K', 'Q', 'J', 'T', '9', '8', '7', '6', '5', '4', '3', '2'];
private readonly static char[] LabelsWithJoker = { 'A', 'K', 'Q', 'T', '9', '8', '7', '6', '5', '4', '3', '2', 'J' };
private readonly static char[] LabelsWithJoker = ['A', 'K', 'Q', 'T', '9', '8', '7', '6', '5', '4', '3', '2', 'J'];
private const char JokerLabel = 'J';
public enum Types
@@ -174,7 +174,7 @@ public class Day07 : IDay
dictLabelCounts.Add(JokerLabel, 5);
}
}
if (dictLabelCounts.Count == 1) { return Types.FiveOfAKind; }
if (dictLabelCounts.Count == 5) { return Types.HighCard; }
if (dictLabelCounts.Count == 2)