aboutsummaryrefslogtreecommitdiff
path: root/Занимательное программирование/4/5_3d/src/main/java/net/caraus/labyrinth/Wall.java
blob: e8615bdc7f98d8da2dd0e2655ed2683b0f69bf21 (plain)
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());
    }
}