Advertisement
Guest User

Untitled

a guest
Jan 26th, 2015
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.70 KB | None | 0 0
  1.   public void updateGrid() {
  2.     grid.setGrid();
  3.     Block[][] shape = activeShape.getShape();
  4.     for (int i = 0; i < shape.length; i ++) {
  5.         for (int j = 0; j < shape[i].length; j++) {
  6.           if (alterShape != null) {
  7.             grid.setTrue(shape[i][j].getPosX()/BLOCK_SIZE, shape[i][j].getPosY()/2 *BLOCK_SIZE);    
  8.           }
  9.         }
  10.       }
  11.      
  12.     for (Shape s: shapes) {
  13.       shape = s.getShape();
  14.       for (int i = 0; i < shape.length; i ++) {
  15.         for (int j = 0; j < shape[i].length; j++) {
  16.           if (alterShape != null) {
  17.             grid.setTrue(shape[i][j].getPosX()/BLOCK_SIZE, shape[i][j].getPosY()/2 *BLOCK_SIZE);    
  18.           }
  19.         }
  20.       }
  21.     }
  22.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement