@Test public void testSetAll() { byte[][] data = QuadraticArrays.parse( "000000000", "111111111", "222222222", "333333333", "444444444", "555555555", "666666666", "777777777", "888888888" ); GameMatrixImpl matrix = new GameMatrixImpl(); matrix.setAll(data); for (int i=0; i < GameMatrix.SIZE; i++) { for (int j=0; j < GameMatrix.SIZE; j++) { assertEquals(i, matrix.get(i, j)); } } }
@Override public final void setAll(final byte[][] initializationData) { for (int i = 0; i < SIZE; i++) { for (int j = 0; j < SIZE; j++) { set(j, i, initializationData[j][i]); } } }
GameMatrixImpl implements Cloneable, BitFreeMatrixInterface { @Override public final void setAll(final byte[][] initializationData) { for (int i = 0; i < SIZE; i++) { for (int j = 0; j < SIZE; j++) { set(j, i, initializationData[j][i]); } } } }
GameMatrixImpl implements Cloneable, BitFreeMatrixInterface { @Override public final void setAll(final byte[][] initializationData) { for (int i = 0; i < SIZE; i++) { for (int j = 0; j < SIZE; j++) { set(j, i, initializationData[j][i]); } } } GameMatrixImpl(); }
GameMatrixImpl implements Cloneable, BitFreeMatrixInterface { @Override public final void setAll(final byte[][] initializationData) { for (int i = 0; i < SIZE; i++) { for (int j = 0; j < SIZE; j++) { set(j, i, initializationData[j][i]); } } } GameMatrixImpl(); @Override final void setAll(final byte[][] initializationData); @Override final void clear(); @Override final byte get(final int row, final int column); @Override void set(final int row, final int column, final byte value); @Override int getSetCount(); @Override final byte[][] getArray(); @Override final String toString(); @Override int hashCode(); @Override final boolean equals(final Object obj); @Override Object clone(); @Override final boolean isValid(); @Override int getFreeMask(
            final int row,
            final int column); @Override final boolean canSet(
            final int row,
            final int column,
            final byte value); }
GameMatrixImpl implements Cloneable, BitFreeMatrixInterface { @Override public final void setAll(final byte[][] initializationData) { for (int i = 0; i < SIZE; i++) { for (int j = 0; j < SIZE; j++) { set(j, i, initializationData[j][i]); } } } GameMatrixImpl(); @Override final void setAll(final byte[][] initializationData); @Override final void clear(); @Override final byte get(final int row, final int column); @Override void set(final int row, final int column, final byte value); @Override int getSetCount(); @Override final byte[][] getArray(); @Override final String toString(); @Override int hashCode(); @Override final boolean equals(final Object obj); @Override Object clone(); @Override final boolean isValid(); @Override int getFreeMask(
            final int row,
            final int column); @Override final boolean canSet(
            final int row,
            final int column,
            final byte value);  }