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