Dominosa Small by oerjan(no cheating this time)

main=interact$head.(?)[].zip[0..].concat.lines
m?((x,d):r)=[show x++',':show y++' ':t|w@(y,e)<-r,(y-x`elem`6:[1|gcd 6y<6])>elem[d,e]m,t<-([d,e]:[e,d]:m)?filter(/=w)r]
_?_=[""]

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page