sudoku-tui

General Info

This tui is written in go, using charm.sh‘s bubbletea, bubbles, and lipgloss tools. I made this as a project to learn a bit about go, and because I love sudoku puzzles. I hope you enjoy!

Installation

  1. Make sure you have go installed and that $GOPATH/bin is in your path. You can add export PATH=$PATH:$GOPATH/bin to your .bashrc or .zshrc or whatever config you use for your shell to do this.

  2. Next, you can run this command to download sudoku-tui

    go install "github.com/Alex-Merrill/[email protected]"
    
  3. Run sudoku-tui to play the game. You can choose easy, medium, or hard difficulty (be warned, medium and hard difficulties are very difficult):

    sudoku-tui easy
    

Guide

You can press ? in the game to see the help menu which gives a brief explanation of controls, but I’ll write them out here.

  1. Movement:

    • Basic Movement:
      • To move the cursor you can use arrow keys or vim movement keys
    • Highlighting Cells
      • To move the cursor while highlighting cells you can press shift along with the basic movement keys. This will enable you to pencil mark or set multiple cells at once.
  2. Pencil Marking cells

    • To pencil mark cells, you can press shift with a number key 1-9. To unmark a number you can again press shift with the number you want to unmark, i.e., if a cell is pencil marked with 1 and 3, you can press shift+1 to leave only the 3 marked in the cell.
    • You can clear all pencil marks in a cell by pressing backspace.
  3. Setting cells

    • You can set a cell to have a certain number value by pressing that number. You can only mark cells with the values 1-9
  4. Clearing cells

    • To clear a cell, you can use backspace. Pressing backspace on both a cell with a set value or pencil marks will clear the cell.
  5. General features

    • Pencil markings will automatically upate when setting a cell value that interacts with the pencil cells, i.e. the set value is in the same row/col/box as the pencil marking.
    • Please create an issue if there are any bugs or new features you’d like to see! I can’t promise I’ll implement them but I’d love to hear any ideas.

GitHub

View Github