Code: Select all
int right = dir + 1 - 4(dir = 4);
int left = dir - 1 + 4(dir = 0);
Code: Select all
public static int[][] offsets = { { 1, 0 }, { 0, -1 }, { -1, 0 }, { 0, 1 } };
int nx = x + offsets[dir][0];
int ny = y + offsets[dir][1];
int nxr = x + offsets[right][0];
int nyr = y + offsets[right][1];
int nxl = x + offsets[left][0];
int nyl = y + offsets[left][1];
Code: Select all
";" expected[code]
why does he ask that