public void shift(Direction direction, int i) {
        switch (direction) {
            case UP:
                pos1 = pos1.addY(-1);
                pos2 = pos2.addY(-1);
                break;
            case DOWN:
                pos1 = pos1.addY(1);
                pos2 = pos2.addY(1);
                break;
            case LEFT:
                pos1 = pos1.addX(-1);
                pos2 = pos2.addX(-1);
                break;
            case RIGHT:
                pos1 = pos1.addX(1);
                pos2 = pos2.addX(1);
                break;
        }
    }