Takes target maze as system parameter