v2.1.0
sudoku_api
sudoku_api는 수수께끼 퍼즐의 생성, 상호작용 및 관리를 간소화합니다.
23좋아요 5130일 다운로드130Pub 점수
AndroidiOSWebmacOSWindowsLinux
수학 퍼즐 게임인 수수도를 구현하기 위한 간단한 플러터 위젯 API입니다.
^3.0.4^2.0.0^1.15.0^1.17.5아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
sudoku_api simplifies the generation, interaction, and management of Sudoku Puzzles.
Well, how does it do that?
... a logic-based, combinatorial number-placement puzzle. The objective is to fill a 9×9 grid with digits so that each column, each row, and each of the nine 3×3 subgrids (segments) that compose the grid contain all of the digits from 1 to 9. The puzzle setter provides a partially completed grid, which for a well-posed puzzle has a single solution.
import 'package:sudoku_api/Puzzle.dart';
void main() {
PuzzleOptions puzzleOptions = new PuzzleOptions(patternName: "winter");
Puzzle puzzle = new Puzzle(puzzleOptions);
puzzle.generate().then((_) {
print("=====================================");
print("Your puzzle, fresh off the press:");
print("-------------------------------------");
printGrid(puzzle.board());
print("=====================================");
print("Give up? Here's your puzzle solution:");
print("-------------------------------------");
printGrid(puzzle.solvedBoard());
print("=====================================");
});
}
=====================================
Your puzzle, fresh off the press:
-------------------------------------
9 8
3 4 7 6 9
8 5 1
4 5
4 5 6 9 3 1 2
3 2
2 8 9
8 3 2 7 5
6 2
=====================================
Give up? Here's your puzzle solution:
-------------------------------------
2 9 1 6 3 4 5 8 7
3 4 5 1 7 8 2 6 9
6 7 8 2 5 9 1 3 4
1 2 3 4 6 5 7 9 8
4 5 6 8 9 7 3 1 2
7 8 9 3 1 2 4 5 6
5 1 2 7 8 6 9 4 3
8 3 4 9 2 1 6 7 5
9 6 7 5 4 3 8 2 1
=====================================
Let's make some sweet Sudoku, together.
sudoku_api, clone, and checkout the dev branchSudoku Toolkit (AlvinRamoutar) - WIP
One of my college projects; Java Sudoku.