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 highest=0
|
||||||
declare -r max_width=20
|
declare -r max_width=20
|
||||||
|
declare axis
|
||||||
for (( i=0; i<HEIGHT; i++ )); do
|
for (( i=0; i<HEIGHT; i++ )); do
|
||||||
[[ "${GAME_HIST[$i]}" -gt "${highest}" ]] && highest="${GAME_HIST[$i]}"
|
[[ "${GAME_HIST[$i]}" -gt "${highest}" ]] && highest="${GAME_HIST[$i]}"
|
||||||
done
|
done
|
||||||
@@ -465,10 +466,12 @@ function render_stats() {
|
|||||||
bar+='▇'
|
bar+='▇'
|
||||||
done
|
done
|
||||||
|
|
||||||
|
axis=$(( i+1 ))
|
||||||
|
|
||||||
if [[ "${ROW}" == "${i}" ]]; then
|
if [[ "${ROW}" == "${i}" ]]; then
|
||||||
echo "$i│${LETTER_GR}$bar${RESET} $value"
|
echo "$axis│${LETTER_GR}$bar${RESET} $value"
|
||||||
else
|
else
|
||||||
echo "$i│$bar $value"
|
echo "$axis│$bar $value"
|
||||||
fi
|
fi
|
||||||
done > "${STATS_FILE}"
|
done > "${STATS_FILE}"
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user