A Self-Avoiding Walker in SwiftUI
Creating a snake that’s scared of itself
Published in
2 min readOct 12, 2022
Having built a snake game the other day, it occurred to me that I might use the source to build something similar and yet different: a self-avoiding walker. Turns out, this task is harder than you may think.
The goal is to modify the snake source so that it creates an ever-growing snake that never runs into…