@Test public void testGetSetCount() { CachedGameMatrixImpl matrix = new CachedGameMatrixImpl(); for (int row = 0; row < GameMatrix.SIZE; row++) { for (int column = 0; column < GameMatrix.SIZE; column++) { matrix.set(row, column, GameMatrix.UNSET); assertEquals(0, matrix.getSetCount()); } } int set = 0; matrix.set(0, 0, (byte)1); set++; assertEquals(set, matrix.getSetCount()); matrix.set(1, 1, (byte)2); set++; assertEquals(set, matrix.getSetCount()); matrix.set(1, 2, (byte)3); set++; assertEquals(set, matrix.getSetCount()); matrix.set(1, 2, GameMatrix.UNSET); set--; assertEquals(set, matrix.getSetCount()); }
@Override public int getSetCount() { return setCount; }
CachedGameMatrixImpl extends GameMatrixImpl implements Cloneable { @Override public int getSetCount() { return setCount; } }
CachedGameMatrixImpl extends GameMatrixImpl implements Cloneable { @Override public int getSetCount() { return setCount; } CachedGameMatrixImpl(); }
CachedGameMatrixImpl extends GameMatrixImpl implements Cloneable { @Override public int getSetCount() { return setCount; } 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 public int getSetCount() { return setCount; } 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();  }