wrote a simple, poorly written maze solver