Exemplo n.º 1
0
    public coordinate[] requireToChange(int side, int angle, coordinate co)
    {
        coordinate[] coo = new coordinate[5];
        coo[0] = co;
        if (side == 1 && (angle == 1 || angle == 3))
        {
            coo[1] = StaticMethodLib.onlyDoOffset(co, 1, 0);
            coo[2] = StaticMethodLib.onlyDoOffset(co, 0, -1);
            coo[3] = StaticMethodLib.onlyDoOffset(co, 1, 1);
            coo[4] = StaticMethodLib.onlyDoOffset(co, 1, 2);
        }
        else if (side == 1 && (angle == 2 || angle == 4))
        {
            coo[1] = StaticMethodLib.onlyDoOffset(co, 0, 1);
            coo[2] = StaticMethodLib.onlyDoOffset(co, -1, 1);
            coo[3] = StaticMethodLib.onlyDoOffset(co, 1, 0);
            coo[4] = StaticMethodLib.onlyDoOffset(co, -2, 1);
        }
        else if (side == 2 && (angle == 1 || angle == 3))
        {
            coo[1] = StaticMethodLib.onlyDoOffset(co, 1, 0);
            coo[2] = StaticMethodLib.onlyDoOffset(co, 1, -1);
            coo[3] = StaticMethodLib.onlyDoOffset(co, 0, 1);
            coo[4] = StaticMethodLib.onlyDoOffset(co, 1, -2);
        }
        else if (side == 2 && (angle == 2 || angle == 4))
        {
            coo[1] = StaticMethodLib.onlyDoOffset(co, 0, -1);
            coo[2] = StaticMethodLib.onlyDoOffset(co, -1, -1);
            coo[3] = StaticMethodLib.onlyDoOffset(co, 1, 0);
            coo[4] = StaticMethodLib.onlyDoOffset(co, -2, -1);
        }

        return(coo);
    }
Exemplo n.º 2
0
    public coordinate[] requireToChange(int side, int angle, coordinate co)
    {
        coordinate[] coo = new coordinate[5];
        coo[0] = co;
        if (angle == 1)
        {
            coo[1] = StaticMethodLib.onlyDoOffset(co, 1, 0);
        }
        else if (angle == 2)
        {
            coo[1] = StaticMethodLib.onlyDoOffset(co, 0, 1);
        }
        else if (angle == 3)
        {
            coo[1] = StaticMethodLib.onlyDoOffset(co, -1, 0);
        }
        else if (angle == 4)
        {
            coo[1] = StaticMethodLib.onlyDoOffset(co, 0, -1);
        }

        for (int i = 2; i < 5; i++)
        {
            coo[i] = new coordinate();
        }
        return(coo);
    }
Exemplo n.º 3
0
    public coordinate[] requireToChange(int side, int angle, coordinate co)
    {
        coordinate[] coo = new coordinate[5];
        coo[0] = co;
        if (angle == 1)
        {
            coo[1] = StaticMethodLib.onlyDoOffset(co, -1, 0);
            coo[2] = StaticMethodLib.onlyDoOffset(co, 0, -1);
            coo[3] = StaticMethodLib.onlyDoOffset(co, 0, 1);
        }
        else if ((side == 1 && angle == 2) || (side == 2 && angle == 4))
        {
            coo[1] = StaticMethodLib.onlyDoOffset(co, 0, -1);
            coo[2] = StaticMethodLib.onlyDoOffset(co, -1, 0);
            coo[3] = StaticMethodLib.onlyDoOffset(co, 1, 0);
        }
        else if (angle == 3)
        {
            coo[1] = StaticMethodLib.onlyDoOffset(co, 1, 0);
            coo[2] = StaticMethodLib.onlyDoOffset(co, 0, -1);
            coo[3] = StaticMethodLib.onlyDoOffset(co, 0, 1);
        }
        else if ((side == 1 && angle == 4) || (side == 2 && angle == 2))
        {
            coo[1] = StaticMethodLib.onlyDoOffset(co, 0, 1);
            coo[2] = StaticMethodLib.onlyDoOffset(co, -1, 0);
            coo[3] = StaticMethodLib.onlyDoOffset(co, 1, 0);
        }

        coo[4] = new coordinate();

        return(coo);
    }
Exemplo n.º 4
0
    public coordinate[] requireToChange(int side, int angle, coordinate co)
    {
        coordinate[] coo = new coordinate[5];
        coo[0] = co;

        coo[1] = StaticMethodLib.onlyDoOffset(co, 1, 0);
        coo[2] = StaticMethodLib.onlyDoOffset(co, -1, 0);
        coo[3] = StaticMethodLib.onlyDoOffset(co, 0, 1);
        coo[4] = StaticMethodLib.onlyDoOffset(co, 0, -1);

        return(coo);
    }