/** * Unit09v80 Piece1.java 07-25-10 by Leon Schram **/ class Piece2 { private static int[][] pieceN = {{2,0}, {2,0}, {2,2}}; private static int[][] pieceE = {{2,2,2}, {2,0,0}}; private static int[][] pieceS = {{2,2}, {0,2}, {0,2}}; private static int[][] pieceW = {{0,0,2}, {2,2,2}}; public static int[][] getShape(int direction) { int[][] temp = null; switch (direction) { case 1 : temp = pieceN; break; case 2 : temp = pieceE; break; case 3 : temp = pieceS; break; case 4 : temp = pieceW; break; } return temp; } }