패키지, 저장소 및 앱 카테고리 검색

GitHub 저장소AlvinRamoutar/sudoku-api

수도쿠-api

수학 퍼즐 게임인 수수도를 구현하기 위한 간단한 플러터 위젯 API입니다.

수도쿠-api 프로젝트 이미지
스타
14
포크
11
최근 푸시(UTC)
2022. 7. 21.
프로젝트 상태
활성

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

Simple, dart API for Sudoku puzzles

Introduction

sudoku_api simplifies the generation, interaction, and management of Sudoku Puzzles.

Well, how does it do that?

  • Contains a Built-in solver for generating new puzzles, or solving existing ones
  • Utilizes and exposes event streams for grid interactions (e.g. cell value changed), and puzzle states
  • Exposes a bunch of neat, easy to use models manipulating Cells, Positions, Grids, and even Patterns of a Sudoku puzzle
What is Sudoku?

... 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.

Example


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("=====================================");
    });
}
Output
=====================================
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 
=====================================
Contributing

Let's make some sweet Sudoku, together.

  1. Fork sudoku_api, clone, and checkout the dev branch
  2. Write some pretty neat code, then push
  3. Create a pull request from a fork
Implementations

Sudoku Toolkit (AlvinRamoutar) - WIP

Inspiration

One of my college projects; Java Sudoku.

Libraries
Alvin GitHub avatar
GitHub 작성자

Alvin ↗

언어Dart

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 4 개

프로젝트에 맞는 저장소를 선택하려면?

사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.

  1. 이름, 작성자 또는 설명으로 검색하고 기술 주제로 범위를 좁힙니다.
  2. 스타, 포크, 최근 푸시를 함께 비교하세요. 스타는 관심의 지표이며 품질을 보장하지 않습니다.
  3. 사용하기 전에 GitHub에서 README, 라이선스, Issues를 확인하세요.

출처 및 관리

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗