Coder Social home page Coder Social logo

shdoku's Introduction

๐Ÿ’ก shdoku

A basic tui sudoku game for your shell.


Preview

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚        โ”‚        โ”‚ 8 9    โ”‚    โ”‚ Hard  โ”‚ <- Difficulty
โ”‚ 4 9 7  โ”‚        โ”‚     6  โ”‚    โ”‚ 36/81 โ”‚ <- Completion in number of cells
โ”‚     2  โ”‚ 3   1  โ”‚   7    โ”‚    โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค    โ”‚ 01:22 โ”‚ <- Elapsed Time
โ”‚     6  โ”‚ 9 7    โ”‚     3  โ”‚    โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚   3    โ”‚ 5   2  โ”‚        โ”‚    โ”‚> Edit โ”‚ <- Active Mode
โ”‚ 7 2    โ”‚ 1   3  โ”‚ 5   4  โ”‚    โ”‚  Mark โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค    โ”‚  Go   โ”‚
โ”‚ 2   1  โ”‚   3 7  โ”‚ 9 5    โ”‚    โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 5      โ”‚     9  โ”‚ 3 4    โ”‚    โ”‚  [9]  โ”‚ <- Preselected Number
โ”‚        โ”‚ 4      โ”‚ 6   1  โ”‚    โ”‚ 4 / 9 โ”‚ <- Completion of preselected Number
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Controls

The current control scheme adheres to vim-like keybindings and is modal.

  • h, j, k, l to move left, down, up, right

  • H, J, K, L to move 3 spaces at once

  • 1-9 to preselect a number

  • Modes:

    • a to enter Markup mode
    • i to enter Edit mode
    • g to enter Go mode
      • 1-9 to move to block
      • you then return to the previous mode
    • A and I to enter Edit/Markup mode "once"
      • do a single edit/mark
      • you then return to the previous mode
    • <esc> to return to Edit mode
  • <space> to place/unplace preselected number/mark

  • x to delete a number/mark

  • q to quit

Todo

  • Game logic

    • Validate Sudokus
    • Generate Sudokus
      • Difficulties to choose
  • Basic UI

    • Basic controls
    • Basic rendering
    • Centered UI
    • Reset terminal state
  • Final UI

    • Final controls
      • Preselect numbers
      • Edit Mode to (re)place numbers
      • Markup Mode to mark where numbers could go
        • Autoremove marks after placing number in edit mode
      • Go Mode to move to blocks 1-9
      • Toggle Number/Mark with Space
      • Undo/Redo stack
    • Colored UI
      • Hightlight preselected numbers
      • Hightlight preselected markups
    • Scoreboard
      • Live timer
      • Mode indicator
      • Difficulty indicator
      • Completion information
    • Menu
      • Difficulty selection
      • Highscore section
      • Color chooser

shdoku's People

Contributors

mxhagen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.