Skip to content

Commit

Permalink
consistency with space-padded operators in arithmetic expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
glennj committed Apr 28, 2024
1 parent a5e19b0 commit 42121d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions exercises/practice/minesweeper/.meta/example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ width=${#1}
parse_input() {
local rownum=0 row col index char
for row in "$@"; do
for ((col=0; col < "${#row}"; col++)); do
for ((col = 0; col < "${#row}"; col++)); do
index="${rownum},${col}"
char=${row:col:1}
board[$index]=$char
Expand All @@ -34,9 +34,9 @@ count() {

create_output() {
local row output col
for ((row=0; row < height; row++)); do
for ((row = 0; row < height; row++)); do
output=""
for ((col=0; col < width; col++)); do
for ((col = 0; col < width; col++)); do
if [[ ${board[$row,$col]} == "*" ]]; then
output+="*"
else
Expand Down

0 comments on commit 42121d3

Please sign in to comment.