Add a cloneWithDirection method for mazegen.rb:150-151