Skip to the content ForoHackers
Log inJoin

My weaver can walk through a corner with no opening in it

AlgorithmsGame development
#8176 · · Quote · Report

Wrote a fill tool for the pattern viewer. On the following three-by-three, the dots are empty and the hashes are solid:

.##
#.#
##.

If I start on the dot in the corner, my tool colours all three dots. Nobody with actual feet could walk from one to the next through that wall. Did I invent a teleporting weaver or has everyone quietly agreed on different rules?

#8372 · · Quote · Report

Your fill can be checking the four edge neighbours and the four diagonal neighbours. With all eight, all three dots touch. With the four edge neighbours only, the first dot is alone. Pick the rule you want the drawing to mean.

#8373 · · Quote · Report

@404andahalf Switched to four for the room map. Still keeping eight for a click on the woven diagonal. Same picture, two jobs. I regret calling the function obviously_connected.

#8374 · · Quote · Report

Keep that name. Put the argument obviously_to_whom next to it.

You are not logged in, so this goes up anonymously: no account, no name and no address is stored with it, and it may carry no link and no image. Log in or join to post under your name. Our web server's logs keep the address and time of every request for up to 14 days; to keep yours out of them, use Tor. To reach the staff in confidence, use the drop. Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply