Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • \$\begingroup\$ Your initial board generation does not guarantee a board that has the input density. I guess it's OP's choice whether to allow that or not. \$\endgroup\$ Commented Dec 27, 2016 at 16:02
  • \$\begingroup\$ Oh, @JarkoDubbeldam asked that already. \$\endgroup\$ Commented Dec 27, 2016 at 16:03
  • \$\begingroup\$ @JungHwanMin How so? Let the density be d. Every position gets a value between 0 and 1. If between 0 and ᵈ⁄₂ it becomes a ,. If between ᵈ⁄₂ and d it becomes a . If between d and 1 it stays empty. \$\endgroup\$ Commented Dec 27, 2016 at 17:15
  • \$\begingroup\$ Well, an extreme case would be: every position somehow gets the value 0 (because they're (pseudo)-randomly generated (pseudo)-independently; very improbable but possible). Then your board is full of s. \$\endgroup\$ Commented Dec 27, 2016 at 17:19
  • \$\begingroup\$ @JungHwanMin Ah, I see what you mean. \$\endgroup\$ Commented Dec 27, 2016 at 17:25