// This class defines the positions of the blocks for the O tetroid and its rotation sequence for use in the super class TetrisPiece. public class TetroidO extends TetrisPiece { private static int[] initial_position = {4,-1,5,-1,5,0,4,0}; // Changes in position for right rotations private static int[] rot3to0 = {0,-1,1,0,0,1,-1,0}; private static int[] rot0to1 = {1,0,0,1,-1,0,0,-1}; private static int[] rot1to2 = {0,1,-1,0,0,-1,1,0}; private static int[] rot2to3 = {-1,0,0,-1,1,0,0,1}; // Changes in position for left rotations private static int[] rot0to3 = {0,1,-1,0,0,-1,1,0}; private static int[] rot1to0 = {-1,0,0,-1,1,0,0,1}; private static int[] rot2to1 = {0,-1,1,0,0,1,-1,0}; private static int[] rot3to2 = {1,0,0,1,-1,0,0,-1}; public TetroidO () { super(2, initial_position, rot3to0, rot0to1, rot1to2, rot2to3, rot0to3, rot1to0, rot2to1, rot3to2); } }