/********************************* * * 問題のランダム生成 * * *******************************/ public static void manageMakingProblem() { Problem p; do { Tapa.resetBoard(); p = new Problem(); p.setRandomWhiteBox(); if (Tapa.DEBUG) { Console.WriteLine("白マス配置完了"); Tapa.printBoard(); } p.makeBlackBoxRoute(); if (Tapa.DEBUG) { Console.WriteLine("黒マス配置完了"); Tapa.printBoard(); } } while (!Tapa.isCorrectAnswer()); p.setBoxNumber(); if (Tapa.DEBUG) { Console.WriteLine("数字マス配置完了"); Tapa.printBoard(); } p.generateTapaPrblem(1); Tapa.processnum_numbox = Tapa.numbox_coord_list.Count; generateTapaProblemText(Problem.savefile_path); }
/********************************* * * txtから問題生成 * * *******************************/ public static void manageMakingProblemFromTxt() { Problem p = new Problem(); if (!p.readDotTapaTxt(Problem.dotfile_path)) { return; } p.setBoxNumber(); if (Tapa.DEBUG) { Console.WriteLine("数字マス配置完了"); Tapa.printBoard(); } // 0:add 1:del 2:add+del p.generateTapaPrblem(1); Tapa.processnum_numbox = Tapa.numbox_coord_list.Count; generateTapaProblemText(Problem.savefile_path); }