Adding code that runs maze without encounters