add 1 to graph axis to match number of guesses
Deploy game to server / deploy (push) Successful in 7s
Deploy game to server / deploy (push) Successful in 7s
This commit is contained in:
1 parent
fba5cc07ae
commit
064b85aac2
1 file changed
+5
-2
@@ -451,6 +451,7 @@ function render_stats() {
|
||||
|
||||
declare highest=0
|
||||
declare -r max_width=20
|
||||
declare axis
|
||||
for (( i=0; i<HEIGHT; i++ )); do
|
||||
[[ "${GAME_HIST[$i]}" -gt "${highest}" ]] && highest="${GAME_HIST[$i]}"
|
||||
done
|
||||
@@ -465,10 +466,12 @@ function render_stats() {
|
||||
bar+='▇'
|
||||
done
|
||||
|
||||
axis=$(( i+1 ))
|
||||
|
||||
if [[ "${ROW}" == "${i}" ]]; then
|
||||
echo "$i│${LETTER_GR}$bar${RESET} $value"
|
||||
echo "$axis│${LETTER_GR}$bar${RESET} $value"
|
||||
else
|
||||
echo "$i│$bar $value"
|
||||
echo "$axis│$bar $value"
|
||||
fi
|
||||
done > "${STATS_FILE}"
|
||||
|
||||
|
||||
Reference in new issue
Block a user