feat: work on day 15 part 1
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
namespace HoofIt;
|
||||
|
||||
record Direction(int XD, int YD)
|
||||
record Direction(int Xd, int Yd)
|
||||
{
|
||||
public static Direction Up = new(0, -1);
|
||||
public static Direction Down = new(0, 1);
|
||||
public static Direction Left = new(-1, 0);
|
||||
public static Direction Right = new(1, 0);
|
||||
public static readonly Direction Up = new(0, -1);
|
||||
public static readonly Direction Down = new(0, 1);
|
||||
public static readonly Direction Left = new(-1, 0);
|
||||
public static readonly Direction Right = new(1, 0);
|
||||
}
|
||||
@@ -4,8 +4,8 @@ record Position(int X, int Y, int Height)
|
||||
{
|
||||
public bool TryGetNextPosition(Direction direction, string[] grid, out Position nextPosition)
|
||||
{
|
||||
var x = X + direction.XD;
|
||||
var y = Y + direction.YD;
|
||||
var x = X + direction.Xd;
|
||||
var y = Y + direction.Yd;
|
||||
|
||||
nextPosition = new(x, y, -1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user