if [ $x_2 -ge $max_x ]; then
offset_2=$offset_1
fi
- new_map+=("$dot")
- new_offset=$((($y * $new_max_x) + $x))
- new_map[$new_offset]=$((${map[$offset_1]} | ${map[$offset_2]}))
+ new_map+=($((${map[$offset_1]} | ${map[$offset_2]})))
done
done
map=("${new_map[@]}")
for (( x=0; x<$max_x; x++ )); do
off_1=$(($offset_1+$x))
off_2=$(($offset_2+$x))
- new_map+=("$dot")
- new_offset=$((($y * $max_x) + $x))
- new_map[$new_offset]=$((${map[$off_1]} | ${map[$off_2]}))
+ new_map+=($((${map[$off_1]} | ${map[$off_2]})))
done
done
map=("${new_map[@]}")