Implementing a simple maze