public Square(ColorType color, int blocksize, Engine e) : base(color, blocksize, e) { int x1 = 4*e.getBS(); int y1=2*e.getBS(); int x2 = x1+e.getBS()*2; int y2 = 0; int bs = e.getBS(); this.colframe = new ColFrame(x1 - bs, y1 + bs, x2 + bs, y2 + bs); Block b1 = new Block(x1, y1, x1 + bs, y1 - bs,color); Block b2 = new Block(x1 + bs, y1, x2, y1 - bs, color); Block b3 = new Block(x1, y1 - bs, x1 + bs, y2, color); Block b4 = new Block(x2 - bs, y2 + bs, x2, y2, color); this.blocks = new Block[4]; blocks[0] = b1; blocks[1] = b2; blocks[2] = b3; blocks[3] = b4; }
public L(ColorType color, int blocksize, Engine e) : base(color, blocksize, e) { int x1 = 4*e.getBS(); int y1=2*e.getBS(); int x2 = x1+e.getBS()*5; int y2 = e.getBS(); int bs = e.getBS(); this.colframe = new ColFrame(x1 - bs, y1 + bs, x1 + 2*bs, y1 - 2*bs); b1 = new Block(x1, y1, x1 + bs, y1 - bs,color); b2 = new Block(x1, y1-bs, x1+bs, y1 - 2*bs, color); b3 = new Block(x1, y1+bs, x1, y1, color); b4 = new Block(x1+bs, y1+bs, x1+2*bs, y1, color); this.blocks = new Block[4]; blocks[0] = b1; blocks[1] = b2; blocks[2] = b3; blocks[3] = b4; this.rotpos = 0; }