public Board() { fillRandom(); fillBufferRow(); colorState = new BoardBitState[(int)Block.BlockColor.COUNT]; for (int s = 0; s < (int)Block.BlockColor.COUNT + 1; s++) { colorState [s] = new BoardBitState(BOARD_HEIGHT, BOARD_WIDTH); } }
private void findRectangles() { for (int c = 0; c < (int)Block.BlockColor.COUNT; c++) { BoardBitState b = colorState [(int)c]; int[] result = new int[BOARD_WIDTH]; var currentRow = b.getRow(0); for (int i = 0; i < BOARD_HEIGHT; i++) { currentRow.And(b.getRow(i)); } } }