namespace Day3; public record Point2D(int X, int Y) { public IEnumerable SurroundingAndSelf() { for (var y = -1; y < 2; y++) { for (var x = -1; x < 2; x++) { yield return new Point2D(X + x, Y + y); } } } } public abstract class Token { public Point2D Position { get; } protected Token(Point2D position) { Position = position; } }