Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //over diagonally
- if (col != 0) {
- int up = col-1;
- for (up = col-1; up >= 0; up--) {
- // back
- if (row != 0) {
- for (int back = col - 1; back >= 0; back--) {
- if (lines.get(up).charAt(back) == '#') {
- int offsetX = col - back;
- int offsetY = row - up;
- int x = back - offsetX;
- int y = up - offsetY;
- while (x >= 0 && y >= 0)
- {
- temp[y][x] = '.';
- x -= offsetX;
- y -= offsetY;
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement