@Test public void testSwapRowWithFirstAndSecond() { GameMatrixImpl actual = new GameMatrixImpl(); actual.setAll(QuadraticArrays.parse( "100000000", "020100000", "000320100", "010000456", "000010000", "000000010", "001000000", "000001000", "000000001" )); GameMatrixImpl expected = new GameMatrixImpl(); expected.setAll(QuadraticArrays.parse( "020100000", "100000000", "000320100", "010000456", "000010000", "000000010", "001000000", "000001000", "000000001" )); Creator.swapRow(actual, 0, 1); assertEquals(expected, actual); }
protected static void swapRow(final GameMatrix matrix, final int rowA, final int rowB) { for (int column = 0; column < GameMatrix.SIZE; column++) { byte av = matrix.get(rowA, column); byte bv = matrix.get(rowB, column); matrix.set(rowB, column, av); matrix.set(rowA, column, bv); } }
Creator { protected static void swapRow(final GameMatrix matrix, final int rowA, final int rowB) { for (int column = 0; column < GameMatrix.SIZE; column++) { byte av = matrix.get(rowA, column); byte bv = matrix.get(rowB, column); matrix.set(rowB, column, av); matrix.set(rowA, column, bv); } } }
Creator { protected static void swapRow(final GameMatrix matrix, final int rowA, final int rowB) { for (int column = 0; column < GameMatrix.SIZE; column++) { byte av = matrix.get(rowA, column); byte bv = matrix.get(rowB, column); matrix.set(rowB, column, av); matrix.set(rowA, column, bv); } } private  Creator(); }
Creator { protected static void swapRow(final GameMatrix matrix, final int rowA, final int rowB) { for (int column = 0; column < GameMatrix.SIZE; column++) { byte av = matrix.get(rowA, column); byte bv = matrix.get(rowB, column); matrix.set(rowB, column, av); matrix.set(rowA, column, bv); } } private  Creator(); static GameMatrix createFull(); static GameMatrix createVariant(
            final GameMatrix fullyFilled); static Riddle createRiddle(final GameMatrix fullMatrix); }
Creator { protected static void swapRow(final GameMatrix matrix, final int rowA, final int rowB) { for (int column = 0; column < GameMatrix.SIZE; column++) { byte av = matrix.get(rowA, column); byte bv = matrix.get(rowB, column); matrix.set(rowB, column, av); matrix.set(rowA, column, bv); } } private  Creator(); static GameMatrix createFull(); static GameMatrix createVariant(
            final GameMatrix fullyFilled); static Riddle createRiddle(final GameMatrix fullMatrix);  }