proc play2
var playAgain : string (1) % gets 'y' or 'n'
locate (maxrow - 3, 1)
PutCenter ("Play Again? (Y/N)")
View.Update
loop
getch (playAgain)
exit when (playAgain = "Y" or playAgain = "y") or (playAgain = "N" or playAgain = "n")
BlinkMessage (maxrow - 2, 2, "Must be 'Y' or 'N'", yellow)
View.Update
if playAgain = "Y" or playAgain = "y" then
var input : string (1) % User's guess
% var puzzle : string := "" % Phrase to guess
var unString, unDisplay : string := "" % Phrase with underlines, To display
var bodyCount : int := 0 % # of errors
var lettersUsed : string := "" % contains all letters entered
var choiceDisplay : string := "" % Centerable string or letters avail.
end if
View.Update
end loop
cls
locate (4, 1)
PutCenter ("Thanks for playing!")
DrawHangman (335, 190, 15, 40, 50, 15, 10, -20, 6, 2)
View.Update
end play2 |