| 123456789101112131415161718192021222324 |
- namespace Day10;
- public record GridPoint(int X, int Y)
- {
- public GridPoint North()
- {
- return new GridPoint(X, Y - 1);
- }
-
- public GridPoint East()
- {
- return new GridPoint(X + 1, Y);
- }
-
- public GridPoint South()
- {
- return new GridPoint(X, Y + 1);
- }
-
- public GridPoint West()
- {
- return new GridPoint(X - 1, Y);
- }
- }
|