-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
89 lines (57 loc) · 2.4 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// See https://aka.ms/new-console-template for more information
namespace Advent;
public class Program {
public static void Main(string[] args) {
//** DAY 1 **//
// int count = 0;
// for (int i = 1; i < Depths.DepthsList.Count() - 2; i++)
// {
// int a = Depths.DepthsList[i] + Depths.DepthsList[i-1] + Depths.DepthsList[i+1];
// int b = Depths.DepthsList[i+1] + Depths.DepthsList[i+2] + Depths.DepthsList[i];
// if(a < b) count++;
// }
// Console.WriteLine(count);
//** DAY 2 **//
// var directions = new Directions();
// SubmarineControls sub = new SubmarineControls();
// foreach (Tuple<string, int> item in directions.List)
// {
// Console.WriteLine(item.Item1);
// sub.Move(item);
// }
// Console.WriteLine(sub.GetDistance());
//** Day 3 **//
// var codes = Diagnostics.Codes;
// CodeProcessor cp = new CodeProcessor(12);
// cp.ProcessCodes(codes);
// Console.WriteLine(cp.GetPowerConsumption());
// var nestedCodes = Diagnostics.CodedList;
// // Console.WriteLine(nestedCodes[0][10]);
// OxyCO2 oxy = new OxyCO2();
// Console.WriteLine(oxy.ProcessCodes(nestedCodes));
//** Day 4 **//
// BingoGame bg = new BingoGame();
// Console.WriteLine(bg.RunGame());
// Console.WriteLine(bg.RunLosingGame());
//** Day 5 **//
// Grid grid = new Grid();
// Coordinates.lines.ForEach(line => {
// grid.ProcessLine(line);
// });
// // grid.ProcessLine(Coordinates.lines[2]);
// Console.WriteLine(grid.GetTwoPlusOverlap());
// ** Day 6 ** //
//80 Day cycle
// FishTank tank = new FishTank(256);
// Console.WriteLine(tank.GetPop());
// FishTankV2 tank = new FishTankV2(256);
// Console.WriteLine(tank.GetPop());
// ** Day 7 ** //
// CrabAlign crabFleet = new CrabAlign();
// Console.WriteLine(crabFleet.getFuelCostV2());
// Day 8
SegmentAnalyzer decoder = new SegmentAnalyzer();
SegmentCodes segmentCodes = new SegmentCodes();
Console.WriteLine(decoder.analyze(segmentCodes.Outputs));
}
}