Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void updateGrid() {
- grid.setGrid();
- Block[][] shape = activeShape.getShape();
- for (int i = 0; i < shape.length; i ++) {
- for (int j = 0; j < shape[i].length; j++) {
- if (alterShape != null) {
- grid.setTrue(shape[i][j].getPosX()/BLOCK_SIZE, shape[i][j].getPosY()/2 *BLOCK_SIZE);
- }
- }
- }
- for (Shape s: shapes) {
- shape = s.getShape();
- for (int i = 0; i < shape.length; i ++) {
- for (int j = 0; j < shape[i].length; j++) {
- if (alterShape != null) {
- grid.setTrue(shape[i][j].getPosX()/BLOCK_SIZE, shape[i][j].getPosY()/2 *BLOCK_SIZE);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement