Dominoes: Difference between revisions
Content added Content deleted
Line 242: | Line 242: | ||
rects = Apply[Rectangle[#1 - {1, 1} 0.5, #2 + {1, 1} 0.5] &, sol[[All, 2]], {1}]; |
rects = Apply[Rectangle[#1 - {1, 1} 0.5, #2 + {1, 1} 0.5] &, sol[[All, 2]], {1}]; |
||
Graphics[{FaceForm[], EdgeForm[Black], rects, MapIndexed[Text[Style[#1, 14, Black], #2] &, tab, {2}]}] |
Graphics[{FaceForm[], EdgeForm[Black], rects, MapIndexed[Text[Style[#1, 14, Black], #2] &, tab, {2}]}] |
||
] |
|||
ClearAll[FindSolutions] |
ClearAll[FindSolutions] |
||
FindSolutions[tab_] := Module[{poss, possshort, possshorti, posssets, posss, sols}, |
FindSolutions[tab_] := Module[{poss, possshort, possshorti, posssets, posss, sols}, |