Wow, mighty impressed by Google Gemini 2.5 pro. With help of ChatGPT o1 I had created python code to solve Sudokus and to Generate Sudokus. For the UI I wanted to try out Gemini.
So I wrote a single prompt, more a spec, of the UI features I wanted.
And the AI delivered a perfectly working, beautiful UI, even with some features I hadn't specified so clearly.
Here's the prompt:
You are an expert python developer.
Below you find python code that can solve and generate sudoku puzzles.
Please write python code for a tk user interface that allows users to solve sudoku puzzles generated by this code. The UI shall have these features
* button to generate a new puzzle, with a difficulty between 1 and 10. Based on the difficulty, use generate_random_start_board, followed by generate_sudoku(startboard, difficulty).
* see the sudoku in standard sudoku layout with clearly separated 3x3 spaces. Use large cells. A cell holds up to 9 very small numbers of what the user thinks are possible numbers, and one large number with the value for the cell the user chose.
* possibility to click into a cell which marks the cell as active
* a toggle (you decide which kind) that decides what happens if the user types a number. If the toggle is "domain" (please find a better word) then you add/remove one of the small numbers. If the toggle is "value" (please find a better word), then you enter the actual value of the cell.
* a button to check whether the solution is still valid, with appropriate means of showing this to the user.
* a restart button
* a "new puzzle" button
And here's two screenshots. Isn't this mindblowing?