Advertisement
fernandoReyna

Untitled

Jun 8th, 2015
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1. /**
  2.  * Initializes window with a grid of bricks.
  3.  */
  4. void initBricks(GWindow window)
  5. {
  6.     int x =0; int y =0;
  7.  for (int a =0; a < 4;a++)
  8.  {  
  9.    for (int i =0;i<8;i++)
  10.    {
  11.        GRect rect = newGRect(x,y,45,20);
  12.        setColor(rect,"red");
  13.        setFilled(rect,true);
  14.        add(window,rect);
  15.        x = x+50;
  16.     }      
  17.    
  18.    y = y+25;
  19.  }  
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement