@Test public void testCreateFull() { GameMatrix r = Creator.createFull(); assertEquals(9*9, r.getSetCount()); assertTrue(r.isValid()); }
public static GameMatrix createFull() { Creator c = new Creator(); c.riddle.clear(); for (int i = 0; i < GameMatrix.BLOCK_COUNT; i++) { c.fillBlock(i * GameMatrix.BLOCK_SIZE, i * GameMatrix.BLOCK_SIZE); } boolean ok = c.backtrack(GameMatrix.TOTAL_FIELDS - c.riddle.getSetCount(), new int[2]); assert ok; return c.winner; }
Creator { public static GameMatrix createFull() { Creator c = new Creator(); c.riddle.clear(); for (int i = 0; i < GameMatrix.BLOCK_COUNT; i++) { c.fillBlock(i * GameMatrix.BLOCK_SIZE, i * GameMatrix.BLOCK_SIZE); } boolean ok = c.backtrack(GameMatrix.TOTAL_FIELDS - c.riddle.getSetCount(), new int[2]); assert ok; return c.winner; } }
Creator { public static GameMatrix createFull() { Creator c = new Creator(); c.riddle.clear(); for (int i = 0; i < GameMatrix.BLOCK_COUNT; i++) { c.fillBlock(i * GameMatrix.BLOCK_SIZE, i * GameMatrix.BLOCK_SIZE); } boolean ok = c.backtrack(GameMatrix.TOTAL_FIELDS - c.riddle.getSetCount(), new int[2]); assert ok; return c.winner; } private  Creator(); }
Creator { public static GameMatrix createFull() { Creator c = new Creator(); c.riddle.clear(); for (int i = 0; i < GameMatrix.BLOCK_COUNT; i++) { c.fillBlock(i * GameMatrix.BLOCK_SIZE, i * GameMatrix.BLOCK_SIZE); } boolean ok = c.backtrack(GameMatrix.TOTAL_FIELDS - c.riddle.getSetCount(), new int[2]); assert ok; return c.winner; } private  Creator(); static GameMatrix createFull(); static GameMatrix createVariant(
            final GameMatrix fullyFilled); static Riddle createRiddle(final GameMatrix fullMatrix); }
Creator { public static GameMatrix createFull() { Creator c = new Creator(); c.riddle.clear(); for (int i = 0; i < GameMatrix.BLOCK_COUNT; i++) { c.fillBlock(i * GameMatrix.BLOCK_SIZE, i * GameMatrix.BLOCK_SIZE); } boolean ok = c.backtrack(GameMatrix.TOTAL_FIELDS - c.riddle.getSetCount(), new int[2]); assert ok; return c.winner; } private  Creator(); static GameMatrix createFull(); static GameMatrix createVariant(
            final GameMatrix fullyFilled); static Riddle createRiddle(final GameMatrix fullMatrix);  }