Bugfix, streak loss now diplays the lost streak

This commit is contained in:
UndeadMaelys 2021-05-24 13:27:56 +02:00
parent 8578d2fe78
commit 2dca704e4a
1 changed files with 3 additions and 3 deletions

View File

@ -77,7 +77,7 @@ function Check(answer)
Correct = Correct + 1 Correct = Correct + 1
else else
io.write(Colorize("Wrong!",COLOR.HighRed).." Answer is ("..Solution..")") io.write(Colorize("Wrong!",COLOR.HighRed).." Answer is ("..Solution..")")
if Streak >= 5 then io.write(Colorize(" [Streak Lost]",COLOR.Cyan,nil,COLORMODE.BlinkFast)) end if Streak >= 5 then io.write(Colorize(" ["..Streak.." Streak Lost]",COLOR.Cyan,nil,COLORMODE.BlinkFast)) end
Streak = 0 Streak = 0
Wrong = Wrong + 1 Wrong = Wrong + 1
end end
@ -104,13 +104,13 @@ function ShowProgress()
if Streak >= 5 then if Streak >= 5 then
io.write(Colorize("CURRENT STREAK: ", COLOR.HighCyan,nil,COLORMODE.BlinkFast)..Colorize(Streak,COLOR.White,nil,COLORMODE.BlinkFast)) io.write(Colorize("CURRENT STREAK: ", COLOR.HighCyan,nil,COLORMODE.BlinkFast)..Colorize(Streak,COLOR.White,nil,COLORMODE.BlinkFast))
end end
io.write("\n\n") io.write(" \n\n")
end end
function UpdateProgress() function UpdateProgress()
io.write("\027[s") io.write("\027[s")
io.write("\027[1;1H") io.write("\027[1;1H")
ShowProgress(true) ShowProgress()
io.write("\027[u") io.write("\027[u")
end end