1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
package net.caraus.labyrinth; public record Wall(Point xy, Point delta) { public int x() { return this.xy.x() + this.delta.x(); } public int y() { return this.xy.y() + this.delta.y(); } public Point end() { return new Point(x(), y()); } }