Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void mirrorTemple()
- {
- int count = 0;
- int mirrorPoint = 276;
- Pixel leftPixel = null;
- Pixel rightPixel = null;
- int count = 0;
- Pixel[][] pixels = this.getPixels2D();
- // loop through the rows
- for (int row = 27; row < 97; row++)
- {
- // loop from 13 to just before the mirror point
- for (int col = 13; col < mirrorPoint; col++)
- {
- leftPixel = pixels[row][col];
- rightPixel = pixels[row]
- [mirrorPoint - col + mirrorPoint];
- rightPixel.setColor(leftPixel.getColor());
- count ++;
- }
- }
- System.out.println("Number of times: " + count);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement