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!
Make sure you have go installed and that
$GOPATH/binis in your path. You can add
export PATH=$PATH:$GOPATH/binto your .bashrc or .zshrc or whatever config you use for your shell to do this.
Next, you can run this command to download sudoku-tui
go install "github.com/Alex-Merrill/[email protected]"
sudoku-tuito play the game. You can choose easy, medium, or hard difficulty (be warned, medium and hard difficulties are very difficult):
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.
- 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.
- Basic Movement:
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.
- 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
- 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.
- 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.