Fixed bug of calculate of maze indexes and added movement of maze within window