globeay / mathdoku

Automatically exported from code.google.com/p/mathdoku
0 stars 0 forks source link

Avoid cell arithmetic overlapping into adjacent cells #98

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Tested with Revision 154.

When using large grids (8x8 or 9x9) and "Allow big cages (beta)" switched on, 
it is possible to get cage arithmetic with 5 digits (see screenshot). This is 
then too large to fit in the cell and overlaps into the next cell.

To avoid this problem, one suggestion would be to limit the maximum arithmetic 
answer to 4 digits when generating the cages.

Original issue reported on code.google.com by em...@srlee.com on 25 Mar 2013 at 7:00

Attachments:

GoogleCodeExporter commented 8 years ago
It is not always necessary to limit to 4 digits. In attached example there is 
no problem in cage having outcome 23520 as the origin cell (top left) has a 
cell on the right that also belongs to same cage.

Original comment by paul.din...@gmail.com on 25 Mar 2013 at 10:27

GoogleCodeExporter commented 8 years ago
That's true, but limiting to 4 digits has other benefits, like stopping the 
sums getting silly big ;-)

Original comment by em...@srlee.com on 25 Mar 2013 at 10:30

GoogleCodeExporter commented 8 years ago
Restricting to 4 digits does not solve the problem in all cases. For example 
cage result "2222x" does not fit in a single cell in case theme "Carved" is 
used. On small screens the maximum number of digits in the cage result should 
never exceed 4 as the result is not readable anymore.

The solution found is as follows:
 * For small screens the maximum cage result is 9,999. For other screens the maximum is set to 99,9999.
 * If needed, the cage result will be scaled so it does fit into a single cell.

See attachment for an example of a cage with result "18432" which does fit into 
a single cell.

Original comment by paul.din...@gmail.com on 26 Mar 2013 at 3:43

Attachments:

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r162.

Original comment by paul.din...@gmail.com on 26 Mar 2013 at 3:46

GoogleCodeExporter commented 8 years ago
Tested Revision 163: Larger (long) numbers are now resized to avoid overlap 
with adjacent cells.
Haven't specifically tested the 9,999 limit on small screens.

Original comment by em...@srlee.com on 27 Mar 2013 at 11:59