@Test public void testSwapColumnWithFirstAndLast() { 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( "000000001", "020100000", "000320100", "610000450", "000010000", "000000010", "001000000", "000001000", "100000000" )); Creator.swapColumn(actual, 0, 8); assertEquals(expected, actual); }
protected static void swapColumn(final GameMatrix matrix, final int columnA, final int columnB) { for (int row = 0; row < GameMatrix.SIZE; row++) { byte av = matrix.get(row, columnA); byte bv = matrix.get(row, columnB); matrix.set(row, columnB, av); matrix.set(row, columnA, bv); } }
Creator { protected static void swapColumn(final GameMatrix matrix, final int columnA, final int columnB) { for (int row = 0; row < GameMatrix.SIZE; row++) { byte av = matrix.get(row, columnA); byte bv = matrix.get(row, columnB); matrix.set(row, columnB, av); matrix.set(row, columnA, bv); } } }
Creator { protected static void swapColumn(final GameMatrix matrix, final int columnA, final int columnB) { for (int row = 0; row < GameMatrix.SIZE; row++) { byte av = matrix.get(row, columnA); byte bv = matrix.get(row, columnB); matrix.set(row, columnB, av); matrix.set(row, columnA, bv); } } private  Creator(); }
Creator { protected static void swapColumn(final GameMatrix matrix, final int columnA, final int columnB) { for (int row = 0; row < GameMatrix.SIZE; row++) { byte av = matrix.get(row, columnA); byte bv = matrix.get(row, columnB); matrix.set(row, columnB, av); matrix.set(row, columnA, bv); } } private  Creator(); static GameMatrix createFull(); static GameMatrix createVariant(
            final GameMatrix fullyFilled); static Riddle createRiddle(final GameMatrix fullMatrix); }
Creator { protected static void swapColumn(final GameMatrix matrix, final int columnA, final int columnB) { for (int row = 0; row < GameMatrix.SIZE; row++) { byte av = matrix.get(row, columnA); byte bv = matrix.get(row, columnB); matrix.set(row, columnB, av); matrix.set(row, columnA, bv); } } private  Creator(); static GameMatrix createFull(); static GameMatrix createVariant(
            final GameMatrix fullyFilled); static Riddle createRiddle(final GameMatrix fullMatrix);  }