这是我的代码的预期输出:
这是我的代码:
import java.awt.*;
public class CafeWall
{
final static int MORTAR = 2;
final static int WIDTH = 650;
final static int HEIGHT = 400;
public static void main( String[] args )
{
StdDraw.setCanvasSize(WIDTH, HEIGHT);
StdDraw.setXscale(0, WIDTH);
StdDraw.setYscale(0, HEIGHT);
// Change from Color.GRAY to change background color.
StdDraw.setPenColor( Color.GRAY );
StdDraw.filledRectangle(WIDTH/2, HEIGHT/2, WIDTH/2, HEIGHT/2);
drawRow( 0, 378, 4, 20 );
drawRow( 50, 300, 5, 30 );
drawGrid( 10, 36, 4, 25, 0 );
drawGrid( 250, 40, 3, 25, 10 …
Run Code Online (Sandbox Code Playgroud)