moved dir enum to global scope
prevented creation of one-way squares. all square now have 3 or more ways out