Crossword

Description

Program creates crossword which contains abalone, abandon, anagram, connect, elegant, enhance

Source: Learn prolog now!, 2001, (course available on-line

Download

Program source code: crossword.pl

Listing

word(abalone,a,b,a,l,o,n,e).
 
word(abandon,a,b,a,n,d,o,n).
 
word(enhance,e,n,h,a,n,c,e).
 
word(anagram,a,n,a,g,r,a,m).
 
word(connect,c,o,n,n,e,c,t).
 
word(elegant,e,l,e,g,a,n,t).
 
 
 
crosswd(V1,V2,V3,H1,H2,H3):-
 
	word(V1,A,B,C,D,E,F,G),
 
	word(V2,A1,B1,C1,D1,E1,F1,G1),
 
	word(V3,A2,B2,C2,D2,E2,F2,G2),
 
	word(H1,A3,B,C3,B1,E3,B2,G3),
 
	word(H2,A4,D,C4,D1,E4,D2,G4),
 
	word(H3,A5,F,C5,F1,E5,F2,G5).
 
 
 
 

Comments

pl/prolog/pllib/crossword.txt · ostatnio zmienione: 2017/07/17 08:08 (edycja zewnętrzna)
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0