I'm programming a game, similar to a Sudoku in the sense that you have to put numbers in a grid. When Sudoku is played in a computer, (for instance, in https://www.chiark.greenend.org.uk/~sgtatham/puzzles/js/solo.html) you simply click on a chosen cell in the grid, and then you press the chosen number in the keyboard. Is this possible in Mathematica?

In the Sudoku implementations I've seen in Mathematica the grid is filled with numbers via a dialog window, or using a pop-up menu, so the gameplay is slow. Is it possible to implement a fast and easy way to introduce the numbers with the keyboard, avoiding the dialog window?


     Table[InputField[ , FieldSize -> 1], {9}, {9}], 
     Dividers -> {q = {True, False, False, 
                       True, False, False, 
                       True, False, False, True}, q}]

...and just rapidly TAB your way through the matrix.

  • $\begingroup$ Thanks David for your answer, I will try now your solution!! $\endgroup$ – cricricombowino Jan 24 '18 at 17:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.