@Test public void testGetBlockFreeMask() { byte[][] data = QuadraticArrays.parse( "100000000", "020100000", "000320100", "010000456", "000010000", "000000010", "001000000", "000001000", "000000001" ); CachedGameMatrixImpl matrix = new CachedGameMatrixImpl(); matrix.setAll(data); int mask = matrix.getBlockFreeMask(0,0); assertEquals(BitFreeMatrixInterface.MASK_FOR_NINE_BITS & (~((1<<1) | (1<<2))), mask); mask = matrix.getBlockFreeMask(0,3); assertEquals(BitFreeMatrixInterface.MASK_FOR_NINE_BITS & (~((1<<1) | (1<<2) | (1<<3))), mask); mask = matrix.getBlockFreeMask(0,6); assertEquals(BitFreeMatrixInterface.MASK_FOR_NINE_BITS & (~((1<<1))), mask); mask = matrix.getBlockFreeMask(3,6); assertEquals(BitFreeMatrixInterface.MASK_FOR_NINE_BITS & (~((1<<1) | (1<<4) | (1<<5) | (1<<6))), mask); }
@Override protected int getBlockFreeMask(final int row, final int column) { return blockFree[row / BLOCK_SIZE][column / BLOCK_SIZE]; }
CachedGameMatrixImpl extends GameMatrixImpl implements Cloneable { @Override protected int getBlockFreeMask(final int row, final int column) { return blockFree[row / BLOCK_SIZE][column / BLOCK_SIZE]; } }
CachedGameMatrixImpl extends GameMatrixImpl implements Cloneable { @Override protected int getBlockFreeMask(final int row, final int column) { return blockFree[row / BLOCK_SIZE][column / BLOCK_SIZE]; } CachedGameMatrixImpl(); }
CachedGameMatrixImpl extends GameMatrixImpl implements Cloneable { @Override protected int getBlockFreeMask(final int row, final int column) { return blockFree[row / BLOCK_SIZE][column / BLOCK_SIZE]; } CachedGameMatrixImpl(); @Override int getFreeMask(final int row, final int column); @Override void set(final int row, final int column, final byte value); @Override int getSetCount(); @Override Object clone(); }
CachedGameMatrixImpl extends GameMatrixImpl implements Cloneable { @Override protected int getBlockFreeMask(final int row, final int column) { return blockFree[row / BLOCK_SIZE][column / BLOCK_SIZE]; } CachedGameMatrixImpl(); @Override int getFreeMask(final int row, final int column); @Override void set(final int row, final int column, final byte value); @Override int getSetCount(); @Override Object clone();  }