diff options
| author | Simon Tatham <anakin@pobox.com> | 2005-05-30 17:57:45 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2005-05-30 17:57:45 +0000 |
| commit | 0e5380b96df67258ae2267eb9f65bd5e4bc06f27 (patch) | |
| tree | fcd53402eda74d470af8d99031ef51c0bda8235b /mines.c | |
| parent | 90560462c4842dccc0288eb408f15539acc0ab83 (diff) | |
| download | puzzles-0e5380b96df67258ae2267eb9f65bd5e4bc06f27.zip puzzles-0e5380b96df67258ae2267eb9f65bd5e4bc06f27.tar.gz puzzles-0e5380b96df67258ae2267eb9f65bd5e4bc06f27.tar.bz2 puzzles-0e5380b96df67258ae2267eb9f65bd5e4bc06f27.tar.xz | |
Constrain mine count to be at most the largest number of mines we
can guarantee to fit into the grid!
[originally from svn r5867]
Diffstat (limited to 'mines.c')
| -rw-r--r-- | mines.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -255,6 +255,8 @@ static char *validate_params(game_params *params) return "Width must be greater than zero"; if (params->h <= 0) return "Height must be greater than zero"; + if (params->n > params->w * params->h - 9) + return "Too many mines for grid size"; /* * FIXME: Need more constraints here. Not sure what the |