Solve the no connection puzzle: Difference between revisions
→{{header|Julia}}
Line 1,270:
('E', 'G'), ('E', 'H'), ('F', 'H')]
function
for edge in EDGES
for perm in permutations(PEGS)▼
end ▼
▲ if abs(perm[edge[1] - 'A' + 1] - perm[edge[2] - 'A' + 1]) < 2
true
▲ end
println("Found $(length(goodtrials)) solutions.")▼
end
const BOARD = raw"""
Line 1,302 ⟶ 1,295:
function printsolutions()
solutions = goodplacements()
for soln in solutions
board = BOARD
|