pixel-examples/community/sudoku
Jason Wangsadinata 91dc0b2643 sudoku: optimize text creation of sudoku numbers
This commit optimizes the text creation of sudoku numbers re-using the
`text.Text` used for printing the numbers to the batch.

Fixes #7.
2019-02-03 19:47:05 +07:00
..
LICENSE add sudoku community example 2018-07-03 22:49:30 +07:00
README.md add sudoku community example 2018-07-03 22:49:30 +07:00
sudoku.go sudoku: optimize text creation of sudoku numbers 2019-02-03 19:47:05 +07:00
sudoku.png add sudoku community example 2018-07-03 22:49:30 +07:00

README.md

Sudoku

A game of Sudoku written in Go.

From Wikipedia:

Sudoku (数独 sūdoku, digit-single) (/suːˈdoʊkuː/, /-ˈdɒk-/, /sə-/, originally called Number Place) is 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 that compose the grid (also called "boxes", "blocks", or "regions") contains 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.

Created by Jason Wangsadinata using Pixel.

This example is kept to the bare minimum for demonstrating just the main concepts of using imdraw, and batch with texts. For a game with slightly more features, please check out Go-Sudoku

Usage

Run it the usual way:

go run sudoku.go

How to Play

  • Left mouse click to select a box.
  • Number keys to input a number.
  • Space or Backspace to delete a number.

Screenshots

Sudoku