On Friday, 3 March 2017 at 04:14:02 UTC, Jordan Wilson wrote:
On Friday, 3 March 2017 at 03:11:24 UTC, steven kladitis wrote:
[...]
I saw this answer for a similar question from Adam D. Ruppe:
Quote:
"...it is anything that Phobos considers "bidirectional" and
"swappable" - an array it can
On Friday, 3 March 2017 at 03:11:24 UTC, steven kladitis wrote:
void main() {
import std.stdio, std.range, std.algorithm, std.string;
const pieces = "KQRrBbNN";
alias I = indexOf;
auto starts = permutations(pieces.dup).filter!(p =>
I(p, 'B') % 2 != I(p, 'b') % 2 &&
void main() {
import std.stdio, std.range, std.algorithm, std.string;
const pieces = "KQRrBbNN";
alias I = indexOf;
auto starts = permutations(pieces.dup).filter!(p =>
I(p, 'B') % 2 != I(p, 'b') % 2 && // Bishop
constraint.
// King constraint.