Ultra
2008-01-06 13:06:31
I was bored, so i made this script. It basically "throws" the dice and then tells you what you got on it :).
Features.
-Animation.
-Var.
-101 Lines Of Code :).
-Waits.
-Report. :P.
Have fun lol.
Features.
-Animation.
-Var.
-101 Lines Of Code :).
-Waits.
-Report. :P.
Program Dicer;
{.Include SRL/SRL.Scar}
Var
Dice : Integer;
Rolls : Integer;
Procedure Animation1;
Begin
ClearDebug;
Begin
WriteLn(' ______ ');
WriteLn(' / 0 \');
WriteLn(' / 0 \');
WriteLn(' ----------');
WriteLn(' | 0 0 |');
WriteLn(' | 0 0 |');
WriteLn(' | 0 0 |');
WriteLn(' ----------');
End;
End;
Procedure Animation2;
Begin
ClearDebug;
Begin
WriteLn(' ________');
WriteLn(' / 0 /\');
WriteLn(' / / \');
WriteLn(' /_0_____/ \');
WriteLn(' \ 0 0 \ 0 /');
WriteLn(' \ 0 0 \ /');
WriteLn(' \_0___0_\/');
End;
End;
Procedure Animation3;
Begin
ClearDebug;
Begin
WriteLn(' ______');
WriteLn(' / 0 0 \');
WriteLn(' / 0 0 \');
WriteLn(' ----------');
WriteLn(' | 0 |');
WriteLn(' | |');
WriteLn(' | 0 |');
WriteLn(' ----------');
End;
End;
Procedure Animation4;
Begin
ClearDebug;
Begin
WriteLn(' ________');
WriteLn(' /\ 0\');
WriteLn(' / \ \');
WriteLn('/ 0 \0______\');
WriteLn('\ 0 / 0 0/');
WriteLn(' \0 / 0 0/');
WriteLn(' \/_0____0/');
End;
End;
Procedure CalculateDice;
Begin
Case Random(6)Of
0:Dice := Dice + 1;
1:Dice := Dice + 2;
2:Dice := Dice + 3;
3:Dice := Dice + 4;
4:Dice := Dice + 5;
5:Dice := Dice + 6;
End;
End;
Begin
SetUpSRL;
Dice := 0;
CalculateDice;
Begin
Repeat
Animation1;
Wait(200);
Animation2;
Wait(200);
Animation3;
Wait(200);
Animation4;
Wait(200);
Rolls := Rolls + 1;
Until(Rolls >= Dice);
If(Rolls >= Dice)Then
Begin
WriteLn('Your Dice Is : ' + IntToStr(Dice));
End;
End;
End.Have fun lol.