Thank you for sharing the simple text game.
Because Pascal encourages good programming practices using structured programming (
https://en.wikipedia.org/wiki/Pascal_%28programming_language%29), I rewrote your code using more structural way:
program project1;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Classes, Dialogs, sysutils, Forms, LCLType, Interfaces
{ you can add units after this };
procedure Play;
const
LE = LineEnding;
var
S: string;
begin
repeat
S := InputBox
('Where...',
'Where you would like to put the cup?' + LE +
'1) On the table 2) On the air' + LE + LE +
'Type ''1'' or ''2'':','');
case S of
'': begin
ShowMessage('You canceled the game!');
Halt;
end;
'1': begin
ShowMessage('The table bears the cup, it''s on the table.');
Exit;
end;
'2': begin
ShowMessage('The cup fell because the gravity and broken on the ground.');
Exit;
end
else
ShowMessage('You entered invalid value!');
end;
until False;
end;
var
i: Integer;
begin
repeat
Play;
i := Application.MessageBox
('Do you like playing again?', 'Again?', MB_YESNO + MB_ICONQUESTION);
until i <> IDYES;
end.
Usually, it is good to avoid using label. Because using label often makes the code harder to debug. Most programmers against using it. Others allow using it but only for some extremely rare cases.
-edit-
It would be more correct to say:
Usually, it is good to avoid using GOTO. Because using GOTO often makes the code harder to debug. Most Pascal programmer against using it. Others allow using it but only for some extremely rare cases.