package eu.midnightdust.yaytris.util;

public class Vec2i {
    private final int x;
    private final int y;

    Vec2i(int x, int y) {
        this.x = x;
        this.y = y;
    }

    public static Vec2i of(int x) {
        //noinspection SuspiciousNameCombination
        return new Vec2i(x, x);
    }
    public static Vec2i of(int x, int y) {
        return new Vec2i(x, y);
    }

    public int getX() {
        return x;
    }

    public int getY() {
        return y;
    }

    public Vec2i offset(Vec2i other) {
        return new Vec2i(x + other.getX(), y + other.getY());
    }
}
