The riddle
In yesterday's newspaper, I found a puzzle in which a Rook should start in the lower-left corner of a 12x12 checkerboard and then, during a round trip, visit each field exactly once except for a selection which must be avoided. The puzzle came with a picture that identified the fields to be avoided as black:
After some minutes, I came up with a solution, that you can find here.
(There's no pic of the solution because you might want to challenge yourself by solving it first...)
The challenge
To write code that produces the same output as my code (that's in TikZ):
\documentclass[tikz,border=1cm]{standalone}\def~{document}\begin~\tikz{\def~{)rectangle++(,)(}\filldraw[step=1]grid(12,12)(8,0~4,~0,3~8,5~11,5~,8~11,9~2,10~4,11~7,11~,);\def~#1#2#3{)-|++(6-#1,4-#2)-|++(6-#3,4-}\draw[line width=2mm,red](.5,.5~1355~5353~5356~7540~7375~7575~7375~7373~7372~5555~5553~5552~7375~7373~7345~5355~5555~5355~5272~5395~5673~7373~7583~9555~7955~5555~8376);\fill[blue](.5,.5)circle(.3)}\end~
of the picture that shows the solution to the Rook's Round Trip. This is Code Golf!
Requirement(s) for the In-/Output
- Use whatever language you want.
- From your output, be able to somehow produce the pixelwise
exact same PNG as in the code section below.
PNG code
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABXoAAAV6AgMAAAAuWCySAAAADFBMVEX///8AAAD/AAAAAP8xSkYMAAAKsklEQVR4Aezdx5HcRhSA4a2aOz2TYBLDEOg6CUSxSeAuRwclsfHotFdZSBiJLftqt7deA0Po+6+vHlDzVcuCM7g4myRJkiRJkiRJkiRJkiRJkiRJkiRJkiRJkiRJkiRJkiRJkiRJkiRJkiRJkiRJkiRJkiRJksqt04s7+D5fYVCiwo0H0eBp82d/0HvAly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvlNylw2+N9z8ixbfZ1NuX5ynL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fC9Tnh/f3jfYePB3rXbfGKVl8IwvX758+fLly5cvX758+fLly5cvX758+fLly5cvX758+fLly5cvX758+fLly5cvX758+fLly5cvX75840ptWhpLQvVSCRvDMnhbGmrcaLjUi1XOb/tpbD/xD9pP47bnly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvny7v80tLvaN+2KjDb58+fLly5cvX758+fLly5cvX758+fLly5cvX758+W7rG8M3+7bfI//ZbryR8sSZL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fMvNnXzHcmYN02+9Tdi4/aVerHJ+442dnN+nfPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5Zv//reWjfZL5b+0jS9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvvv0DT57341gkP+YmC9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnyzfUttWhpLQ4kb4WBYBm9LXLiRMOh5fkvU7s9vfA++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPnyTfHNf2Nc6Bv2xRobfPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny3YFv1g+r1hIeEwcb6ffgy5cvX758+fLly5cvX758+fLly5cvX758+fLly5cvX758+fLly5cvX758+fLly5cvX758+fLly5cv31I7oYwlo8RLhQ3LPd6ueo8XDa7Jh8755cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL99gEJa0sf1r3vjy5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5bsD34ZB1j3aP2K8kTqo8eXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLl2+pTUtjqbUMghIuNSyDtyUu3kgfvNjs/Dq/fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5bvpi+G2e81b0C58+fLly5cvX758+fLly5cvX758+fLly5cvX758+fLlW0vYqGU8Jq51HfDly5cvX758+fLly5cvX758+fLly5cvX758+fLly5cvX758+fLly5cvX758+fLly5cvX758+fLly5dvqZ1QxlKLB3HxRnrDco+3Zc1e/I/P79NmlPAeTz8fX758+fLly5cvX758+fLly5cvX758+fLly5cvX758+fLly5cvX758+fLly5cvX758+fLly5cvX758+fLlG7bGxhcpvje8Rm8Hvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58k3fCAcBY5ZvwqVqfPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5Vtq09JYGsrbiAfDMngbD+JSLuX81kFQ/qX48uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXL99xe8xb7hn2xwcZmvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58t30wXLDk9rGx8S9L8WXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++5eZOWmM8jzc2aVhu/rbHpV5k+jq/CeeXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPu/GG7717ztwJcvX758+fLly5cvX758+fLly5cvX758+fLly5cvX77pP6waD+KP2P7ZEy7Fly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLtyW+fPny5cuXL1++fPk2dEIZMzbiwbAM3jYMgoKNpsGLO/g+v/vA+eXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly/fM3nN22Xn17ztyZcvX758+fLly5cvX758+fLly5cvX758+fLly5cvX74xymWfB8tBDxoGjShJvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uVbaieUsdTiQVz7Rn7DcvO3d9+IBy/O9PyWqP2fX758+fLly5cvX758+fLly5cvX758+fLly5cvX758+fLly5cvX758+fLly5cvX758+fLly5cvX758+fJtq913Wuc1b0G78OXLly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLl2+tfdDse5n/bLfbBl++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPny5cuXL1++fPmW2rQ0lk2Kbz4sg7fxIC5/40X/85s/SDq/TyOjF/nnly9fvnz58uXLly9fvnz58uXLly9fvnz58uXLdx++387z/EM3X77z0lUnRr7351OdGPnOv3fdhZHv/fmPujDyPX7yverAyPcwf+q6AyPf+9X3pw6MfI9zrQMj3/nPrvim+x7+4nvNN933/l98f+rqy3fmm+57/KvvFd9s33k9X77XfJN9Dyv68v2Jb7Lvfb58d+M7T9sU+4a1+7aX4Hvky3c/vt/x/RRfvnxnvnz58uXLly9fvnz5rpv/fuPLly/fqcbX8yG+fDd7fhz0oHkQ++bd47P48yV8r/km+16s6Mv3im+273E9X76pWnz7f7+F76GrL9+Lvt9/43vs+v1Nvve7fv+Y76Hr9+f5XvT9/Qe+x66/D8P3UP/20IGRbz3AV30Y+R7q8eWb7lv/Fa2DFt8K/FO+Ft8gvnz58uXLly9fvnz58uXLly9fvnz58uXLly9fvrv0Lbp1v7YHBwQAABAAgEz0f40ZoMqAKQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAO+uutlkASEAAAAASUVORK5CYII=
Bonus imaginary internet points
- Write the code in TikZ
- Your TikZ-code should compile without any errors, warnings, and boxes.
- You should be able to produce a PNG-file with Overleaf that, when saved in the same dimensions, must be able to withstand a bitwise comparsion with my solution.