Bug 163806 - Too small number of mines in custom level.
Summary: Too small number of mines in custom level.
Status: RESOLVED FIXED
Alias: None
Product: kmines
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Dmitry Suzdalev
URL:
Keywords:
: 220767 249115 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-06-11 18:22 UTC by Paweł Wysocki
Modified: 2010-08-26 16:29 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paweł Wysocki 2008-06-11 18:22:13 UTC
Version:            (using Devel)
Installed from:    Compiled sources
Compiler:          qt4.4.0 
OS:                Linux

In custom level we can set only 99 mines. It's sometimes not enough, because if you set 50x50x99 it's very easy.

You only need to change
<entry name="CustomMines" type="Int" key="custom mines">
   <label>The number of mines in the playing field.</label>
   <default>20</default>
</entry>
to
<entry name="CustomMines" type="Int" key="custom mines">
  <label>The number of mines in the playing field.</label>
  <default>20</default>
  <max>xxx</max>
</entry>

Where xxx is number.
Comment 1 Frederik Schwarzer 2010-04-19 02:53:23 UTC
Dmitry: What do you think about this one? It seems like an easy fix. :)
Comment 2 Frederik Schwarzer 2010-04-19 03:56:59 UTC
SVN commit 1116276 by schwarzer:

set the maximum number of mines to 200

BUG: 163806


 M  +1 -0      kmines.kcfg  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1116276
Comment 3 Frederik Schwarzer 2010-04-19 17:41:19 UTC
*** Bug 220767 has been marked as a duplicate of this bug. ***
Comment 4 Parker Coates 2010-04-19 18:43:32 UTC
SVN commit 1116513 by coates:

Dynamically calculate the maximum number of mines in the custom config.

The maximum number of mines that KMines actually allows on a custom
board is WIDTH * HEIGHT - 10. Instead of hardcoding any particular
maximum, the dialog now dynamically sets the maximum value of the
mines spinbox everytime the values of the width and height spinboxes
changed.

BUG: 163806

 M  +1 -1      kmines.kcfg  
 M  +20 -3     mainwindow.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1116513
Comment 5 Frederik Schwarzer 2010-05-06 14:36:54 UTC
SVN commit 1123625 by schwarzer:

backport of r1116276 and r1116513: Dynamically calculate the maximum number of mines in the custom config.

The maximum number of mines that KMines actually allows on a custom
board is WIDTH * HEIGHT - 10. Instead of hardcoding any particular
maximum, the dialog now dynamically sets the maximum value of the
mines spinbox everytime the values of the width and height spinboxes
changed.

BUG: 163806



 M  +1 -0      kmines.kcfg  
 M  +17 -0     mainwindow.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1123625
Comment 6 Parker Coates 2010-08-26 16:29:22 UTC
*** Bug 249115 has been marked as a duplicate of this bug. ***