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

variierende Leerzeichen ergänzt

parent 4eaedc30
No related branches found
No related tags found
No related merge requests found
...@@ -53,6 +53,7 @@ digitFile[8]='digit-8.png' ...@@ -53,6 +53,7 @@ digitFile[8]='digit-8.png'
digitFile[9]='digit-9.png' digitFile[9]='digit-9.png'
digitFile[10]='minus.png' digitFile[10]='minus.png'
digitFile[11]='plus.png' digitFile[11]='plus.png'
digitFile[12]=$emptyCanvas
NUM2CHAR[0]='0' NUM2CHAR[0]='0'
NUM2CHAR[1]='1' NUM2CHAR[1]='1'
...@@ -66,6 +67,7 @@ NUM2CHAR[8]='8' ...@@ -66,6 +67,7 @@ NUM2CHAR[8]='8'
NUM2CHAR[9]='9' NUM2CHAR[9]='9'
NUM2CHAR[10]='-' NUM2CHAR[10]='-'
NUM2CHAR[11]='+' NUM2CHAR[11]='+'
NUM2CHAR[12]='_'
digitPos[1]='+158+173.65' digitPos[1]='+158+173.65'
digitPos[2]='+192+173.65' digitPos[2]='+192+173.65'
...@@ -89,7 +91,7 @@ value="" ...@@ -89,7 +91,7 @@ value=""
DPR=$((RANDOM % $NUMBER_OF_DIGITS + 1)) # random dot position (1..$NUMBER_OF_DIGITS) DPR=$((RANDOM % $NUMBER_OF_DIGITS + 1)) # random dot position (1..$NUMBER_OF_DIGITS)
for (( i=1; i<=$MAX_DIGITS; i++ )); do for (( i=1; i<=$MAX_DIGITS; i++ )); do
if (( $i <= $NUMBER_OF_DIGITS )); then if (( $i <= $NUMBER_OF_DIGITS )); then
R=$((RANDOM % 12)) # random digit number (0..11='0'..'+') R=$((RANDOM % 13)) # random digit number (0..12='0'..'_')
eval DIGIT$i=${digitFile[R]} eval DIGIT$i=${digitFile[R]}
value+="${NUM2CHAR[R]}" value+="${NUM2CHAR[R]}"
if [ $DPR == $i ]; then if [ $DPR == $i ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment