Sudoku: Alternate grid sizes

Previous page Next page

Alternative grid sizes

As downloaded SourGumdrop is a standard 9x9 Sudoku playing program but it can optionally be used to play 16x16 and 4x4 grids. To change to a 16x16 grid size you need to alter a single value in the source code:

In class SGG change

SYMBOL_SET_SIZE = 9

to

SYMBOL_SET_SIZE = 16

Remember it is Python so no compilation is required after the change - just run it.

SourGumdrop: example 16x16

Figure 1. A screen dump from SourGumdrop in 16x16 mode [click for larger image].

I don't know how popular these alternatives such as sudoku16 are likely to become so haven't gone to much trouble with the 16x16 and 4x4 versions: they could be activated by a configuration option and I could lay out the cells a bit better. Also I've only included a single puzzle of each type - others would have to be loaded from file or the edit window. Let me know if you'd like these things done. Personally I was just pleased to have coded the program so that only a single number needed changing to make the switch - otherwise the code is the same.

SourGumdrop: 4x4 example
Figure 2. A screen dump from SourGumdrop in 4x4 mode.

Last updated: 2012-10-28    Sitemap