Skip to content
Snippets Groups Projects
Commit 4eaedc30 authored by Rolf Niepraschk's avatar Rolf Niepraschk
Browse files

variierende Leerzeichen ergänzt

parent 918d19a0
No related branches found
No related tags found
No related merge requests found
......@@ -49,6 +49,7 @@ digitFile[7]='digit-7.png'
digitFile[8]='digit-8.png'
digitFile[9]='digit-9.png'
digitFile[10]='minus.png'
digitFile[11]=$emptyCanvas
dotFile='dot.png'
minusFile='minus.png'
......@@ -65,6 +66,7 @@ NUM2CHAR[7]='7'
NUM2CHAR[8]='8'
NUM2CHAR[9]='9'
NUM2CHAR[10]='-'
NUM2CHAR[11]='_'
digitPos[1]='+197+198'
digitPos[2]='+238+198'
......@@ -84,7 +86,7 @@ value=""
DPR=$((RANDOM % $NUMBER_OF_DIGITS + 1)) # random dot position (1..$NUMBER_OF_DIGITS)
for (( i=1; i<=$MAX_DIGITS; i++ )); do
if (( $i <= $NUMBER_OF_DIGITS )); then
R=$((RANDOM % 11)) # random digit number (0..10 = '0'..'-')
R=$((RANDOM % 12)) # random digit number (0..11 = '0'..'_')
eval DIGIT$i=${digitFile[R]}
value+="${NUM2CHAR[R]}"
if [ $DPR == $i ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment