var scoreLevel : int := 50
var score : int :=0
if score >= scoreLevel %ready to enter next level
then cls %clears the screen for the scoring updates
%scoring system (after each completed level)
put "Your score is: ", score %score with out additional time bonus
var bonus:int:=60 %1 min to get bonus (bonus = 60000 milliseconds = 60 seconds =1 min)
var timeBonus:int :=bonus-Time.Elapsed div 1000 %1 min timer (Time.Elapsed = 1000 milliseconds = 1 min)
put "Your time bonus is: ", timeBonus %time bonus
score:=score+timeBonus %updated score = score as of to that point + time bonus
put "Your overall score is: ", score %score as of to that point + time bonus
put "[press enter to continue to next round]" %gives the user time to read the score
scoreLevel:=score+50 %next level will be completed after an additional 50 points
end if
|