commit 3c4c1458ba65520b87a14e2f433ce083658e3369
parent fbfff786589b9f92c8825d00f9a852f7bfbd1240
Author: Juan F. Meleiro <juan@juanmeleiro.mat.br>
Date: Mon, 3 Jun 2024 10:24:20 +0200
Make height-graph relative to a scale
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/absurdor b/absurdor
@@ -233,7 +233,7 @@ if args.command == "report" then
-- Height graph
f:write("THE ROAD SO FAR\n")
for i = #plot, 1, -1 do
- f:write("|", string.rep("#", plot[i] or 0))
+ f:write("|", string.rep("#", math.floor(30*plot[i]/max) or 0))
if i == max then
f:write(" <- the heighest we've ever reached!")
elseif i == #plot then