Z_Block.java (577B)
1 package blocks; 2 3 import java.awt.Color; 4 5 public class Z_Block extends Poly { 6 // holds the information that dictates what shape the object becomes on the 7 // board 8 public int[][] Shape = { 9 10 { 1, 1, 0 }, { 0, 1, 1 }, }; 11 12 public Z_Block(int x, int y) { 13 super(x, y); 14 super.setColor(Color.red); 15 } 16 17 @Override 18 public int[][] getShape() { 19 // TODO Auto-generated method stub 20 return Shape; 21 } 22 23 @Override 24 public void rotateRight() { 25 Shape = super.rotateClockwise(Shape); 26 } 27 28 @Override 29 public void rotateLeft() { 30 Shape = super.rotateCounterClockwise(Shape); 31 } 32 }