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); }
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); }
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); }
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); }