[CODE lang="java" title="der code"]private static void drawLandscape(Color[][] landscape) {
float square = 1* landscape.length-1;
float halfLength = 2* landscape.length;
for (int i = 0; i < landscape.length;i++){
for (int j = 0; j < landscape.length;j++){
StdDraw.setPenColor(landscape[j]);
StdDraw.filledSquare(canvasSize*i/square,canvasSize*j/square,canvasSize/halfLength );
}
}
}[/CODE]
float square = 1* landscape.length-1;
float halfLength = 2* landscape.length;
for (int i = 0; i < landscape.length;i++){
for (int j = 0; j < landscape.length;j++){
StdDraw.setPenColor(landscape[j]);
StdDraw.filledSquare(canvasSize*i/square,canvasSize*j/square,canvasSize/halfLength );
}
}
}[/CODE]