Added retry when winning

This commit is contained in:
IllusionMan1212
2018-06-19 20:44:01 +02:00
parent 9e7d263bf3
commit 787c5c67a5
+12 -9
View File
@@ -16,9 +16,7 @@ begin
if (entry = myRnd) then if (entry = myRnd) then
begin begin
writeln('BINGO!!!!'); writeln('BINGO!!!!');
writeln(); break;
writeln('Do you want to retry? [Y/N]');
readln(dialog);
end end
else else
if (entry < myRnd) and (i <> 10) then if (entry < myRnd) and (i <> 10) then
@@ -31,7 +29,10 @@ begin
write('aim lower'); write('aim lower');
end; end;
end; end;
if (i = 10) then
begin
writeln('GAME OVER!'); writeln('GAME OVER!');
end;
writeln(); writeln();
writeln('Do you want to retry? [Y/N]'); writeln('Do you want to retry? [Y/N]');
readln(dialog); readln(dialog);
@@ -49,9 +50,7 @@ begin
if (entry = myRnd) then if (entry = myRnd) then
begin begin
writeln('BINGO!!!!'); writeln('BINGO!!!!');
writeln(); break;
writeln('Do you want to retry? [Y/N]');
readln(dialog);
end end
else else
if (entry < myRnd) and (i <> 5) then if (entry < myRnd) and (i <> 5) then
@@ -64,7 +63,10 @@ begin
write('aim lower'); write('aim lower');
end; end;
end; end;
if (i = 5) then
begin
writeln('GAME OVER!'); writeln('GAME OVER!');
end;
writeln(); writeln();
writeln('Do you want to retry? [Y/N]'); writeln('Do you want to retry? [Y/N]');
readln(dialog); readln(dialog);
@@ -82,9 +84,7 @@ begin
if (entry = myRnd) then if (entry = myRnd) then
begin begin
writeln('BINGO!!!!'); writeln('BINGO!!!!');
writeln(); break;
writeln('Do you want to retry? [Y/N]');
readln(dialog);
end end
else else
if (entry < myRnd) and (i <> 3) then if (entry < myRnd) and (i <> 3) then
@@ -97,7 +97,10 @@ begin
write('aim lower'); write('aim lower');
end; end;
end; end;
if (i = 3) then
begin
write('GAME OVER!'); write('GAME OVER!');
end;
writeln(); writeln();
writeln('Do you want to retry? [Y/N]'); writeln('Do you want to retry? [Y/N]');
readln(dialog); readln(dialog);