(int width, int height)
| 17 | |
| 18 | // create random width-by-height array of tiles |
| 19 | public static Picture randomPicture(int width, int height) { |
| 20 | Picture picture = new Picture(width, height); |
| 21 | for (int col = 0; col < width; col++) { |
| 22 | for (int row = 0; row < height; row++) { |
| 23 | int r = StdRandom.uniform(255); |
| 24 | int g = StdRandom.uniform(255); |
| 25 | int b = StdRandom.uniform(255); |
| 26 | Color color = new Color(r, g, b); |
| 27 | picture.set(col, row, color); |
| 28 | } |
| 29 | } |
| 30 | return picture; |
| 31 | } |
| 32 | |
| 33 | |
| 34 | public static double[][] toEnergyMatrix(SeamCarver sc) { |
nothing calls this directly
no outgoing calls
no test coverage detected