Data update
This commit is contained in:
parent
ed705008a8
commit
0df55f9f24
2196 changed files with 32999 additions and 3075 deletions
|
|
@ -0,0 +1,12 @@
|
|||
check(Row) :-
|
||||
nth1(King, Row, ♔),
|
||||
nth1(Rook1, Row, ♖),
|
||||
nth1(Rook2, Row, ♖),
|
||||
nth1(Bishop1, Row, ♗),
|
||||
nth1(Bishop2, Row, ♗),
|
||||
Rook1 < King, King < Rook2,
|
||||
(Bishop1 + Bishop2) mod 2 =:= 1.
|
||||
|
||||
generate(Row) :-
|
||||
random_permutation([♖,♘,♗,♕,♔,♗,♘,♖], Row),
|
||||
check(Row) ; generate(Row).
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
?- generate(X).
|
||||
X = [♘, ♗, ♖, ♕, ♘, ♔, ♗, ♖] ;
|
||||
X = [♘, ♗, ♖, ♕, ♘, ♔, ♗, ♖] ;
|
||||
X = [♘, ♖, ♘, ♕, ♔, ♖, ♗, ♗] ;
|
||||
X = [♘, ♖, ♘, ♕, ♔, ♖, ♗, ♗]
|
||||
Loading…
Add table
Add a link
Reference in a new issue