Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {You need a file named OPTI.TXT contain 3 number in the same line }
- {This is just a demo, I will update the game soon}
- {Any report pls send to my email pewdiepie@gmail.com}
- {This was made by Tran Viet Anh AKA Wade Rollins}
- Program A_very_boring_game;
- Uses crt;
- Var
- A,B,C,IC,Di,TC1, TC2, TC3, Name: String;
- i,n,s,e,f: Integer;
- x,y:Integer;
- m,v,o,m1,m2,m3,n1,n2,n3,o1,o2,o3,ro,rou: Integer;
- t: text;
- Function Up(m: String): String;
- Var i: Integer;
- Begin
- For i:=1 to length(m) do
- m[i]:=Upcase(m[i]);
- Up:=m;
- End;
- Procedure Enter_Name;
- Begin
- TextColor(s);
- Write('Enter your name: '); TextColor(e); Readln(Name);
- End;
- Procedure Ask;
- Begin
- TextColor(s);
- clrscr;
- Write('Hey!!!'); Delay(750); TextColor(e); Writeln(' ',Name,'!!!');
- TextColor(s);
- Writeln('Wanna play PAPER ROCK SCRISSOR???'); Delay(750);
- Write('Answer(Yes/No): '); TextColor(e); Readln(A); TextColor(s);
- End;
- Procedure Denied;
- Begin
- Writeln('God damn it!!!'); Delay(1000);
- Writeln('Then get outta here!!!'); Delay(1000);
- Halt;
- End;
- Procedure Option;
- Begin
- clrscr; Delay(1000);
- Write('Welcome to '); TextColor(e); Write('option'); TextColor(s);
- Writeln('!'); Delay(1000);
- Writeln('This is where you change some function of the game!'); Delay(1000);
- Writeln('Just type what you need to change then press Enter ok???'); Delay(1000);
- Write('1.Normal Text Color(Instant: '); TextColor(s); Write(TC1);
- TextColor(s); Write('): '); Readln(TC1);
- Write('2.Important Text Color(Instant: '); TextColor(e); Write(TC2);
- TextColor(s); Write('): '); Readln(TC2);
- Write('3.Number Text Color(Instant: '); TextColor(f); Write(TC3);
- TextColor(s); Write('): '); Readln(TC3);
- Write('4.Difficulties: (Instant: '); TextColor(e); Write(Di);
- TextColor(s); Write('): '); Readln(Di);
- {**************************************************}
- If (TC1='Blue') or (TC1='blue') then s:=1;
- If (TC1='Green') or (TC1='green') then s:=2;
- If (TC1='Cyan') or (TC1='cyan') then s:=3;
- If (TC1='Red') or (TC1='red') then s:=4;
- If (TC1='Purple') or (TC1='purple') then s:=5;
- If (TC1='Brown') or (TC1='brown') then s:=6;
- If (TC1='Gray') or (TC1='gray') then s:=7;
- If (TC1='Pink') or (TC1='pink') then s:=12;
- If (TC1='Yellow') or (TC1='yellow') then s:=14;
- If (TC1='White') or (TC1='white') then s:=15;
- {*******************************************}
- If (TC2='Blue') or (TC2='blue') then e:=1;
- If (TC2='Green') or (TC2='green') then e:=2;
- If (TC2='Cyan') or (TC2='cyan') then e:=3;
- If (TC2='Red') or (TC2='red') then e:=4;
- If (TC2='Purple') or (TC2='purple') then e:=5;
- If (TC2='Brown') or (TC2='brown') then e:=6;
- If (TC2='Gray') or (TC2='gray') then e:=7;
- If (TC2='Pink') or (TC2='pink') then e:=12;
- If (TC2='Yellow') or (TC2='yellow') then e:=14;
- If (TC2='White') or (TC2='white') then e:=15;
- {*******************************************}
- If (TC3='Blue') or (TC3='blue') then f:=1;
- If (TC3='Green') or (TC3='green') then f:=2;
- If (TC3='Cyan') or (TC3='cyan') then f:=3;
- If (TC3='Red') or (TC3='red') then f:=4;
- If (TC3='Purple') or (TC3='purple') then f:=5;
- If (TC3='Brown') or (TC3='brown') then f:=6;
- If (TC3='Gray') or (TC3='gray') then f:=7;
- If (TC3='Pink') or (TC3='pink') then f:=12;
- If (TC3='Yellow') or (TC3='yellow') then f:=14;
- If (TC3='White') or (TC3='white') then f:=15;
- TextColor(s); Write('Done!!!!!'); Delay(1000); Writeln(' Lets play!');
- Assign(t,'OPTI.TXT); Rewrite(t);
- Write(t,s,' ',e,' ',f);
- Close(t);
- End;
- Procedure Allowed;
- Begin
- Writeln('OK!!!'); Delay(1000);
- Writeln('Lets play!'); Delay(1000);
- End;
- Procedure Introduction;
- Begin
- TextColor(e);
- Writeln('Paper beats Rocks'); Delay(1000);
- Writeln('Rocks beats Scrissor'); Delay(1000);
- Writeln('Scrissor beats Paper'); Delay(1000);
- TextColor(s);
- Write('You can choose '); TextColor(e); Write('Rock/Paper/Scrissor ');
- TextColor(s); Write('or '); TextColor(e); Writeln('R/P/S');
- TextColor(s); Write('Just type "');TextColor(e);
- Write('Stop'); TextColor(s);
- Writeln('" when you want to stop while playing ok???'); Delay(1000);
- End;
- Procedure Choose;
- Begin
- Write('If you want to go to the option now, type "'); TextColor(e);
- Write('option'); TextColor(s); Writeln('" then Enter');
- Write('Or you can type "'); TextColor(e); Write('play'); TextColor(s);
- Writeln('" and press Enter to play right now!');
- End;
- Procedure Round;
- Begin
- clrscr;
- Delay(500);
- Write('choose round(<50): '); Readln(ro);
- While 50<ro do
- Begin
- Write('choose again!!!: '); Readln(ro);
- End;
- clrscr; Delay(1000);
- Randomize;
- Write('Remember, you only have '); TextColor(e); Write(ro); TextColor(s);
- Writeln(' round to battle! Be careful!');
- rou:=1; x:=0; y:=0; N:=5; m:=0; v:=0; o:=0; m1:=0;
- m2:=0; m3:=0; n1:=0; n2:=0; n3:=0; o1:=0; o2:=0; o3:=0;
- While (rou<=ro) do
- Begin
- Write('You choose: '); TextColor(e); Readln(A); TextColor(s);
- i:=Random(N);
- Case i of
- 0: B:='Rock';
- 1: B:='Paper';
- 2: B:='Scrissor';
- End;
- If ((Up(A)='ROCK') or (Up(A)='R')) and (B='Rock') then
- Begin
- m:=m+1;
- Write('I choose '); TextColor(e); Write(B);
- TextColor(s); Writeln(', Its a tie!!!');
- Delay(750); m1:=m1+1;
- Writeln(x,'-',y,'!!!'); rou:=rou+1;
- If ro-rou<0 then
- Begin
- TextColor(e);
- Writeln('Battle over!');
- TextColor(s);
- End
- else
- Writeln(ro-rou+1,' round left!');
- End;
- If ((Up(A)='ROCK') or (Up(A)='R')) and (B='Paper') then
- Begin
- m:=m+1;
- Write('I choose '); TextColor(e); Write(B); TextColor(s);
- Writeln(', I win!!!'); y:=y+1;
- Delay(750); m3:=m3+1;
- Writeln(x,'-',y,'!!!'); rou:=rou+1;
- If ro-rou<0 then
- Begin
- TextColor(e);
- Writeln('Battle over!');
- TextColor(s);
- End
- else
- Writeln(ro-rou+1,' round left!');
- End;
- If ((Up(A)='ROCK') or (Up(A)='R')) and (B='Scrissor') then
- Begin
- m:=m+1;
- Write('I choose '); TextColor(e); Write(B); TextColor(s);
- Writeln(', You win!!!'); x:=x+1;
- Delay(750); m2:=m2+1;
- Writeln(x,'-',y,'!!!'); rou:=rou+1;
- If ro-rou<0 then
- Begin
- TextColor(e);
- Writeln('Battle over!');
- TextColor(s);
- End
- else
- Writeln(ro-rou+1,' round left!');
- End;
- If ((Up(A)='PAPER') or (Up(A)='P')) and (B='Paper') then
- Begin
- v:=v+1;
- Write('I choose '); TextColor(e); Write(B); TextColor(s);
- Writeln(', Its a tie!!!');
- Delay(750); n1:=n1+1;
- Writeln(x,'-',y,'!!!'); rou:=rou+1;
- If ro-rou<0 then
- Begin
- TextColor(e);
- Writeln('Battle over!');
- TextColor(s);
- End
- else
- Writeln(ro-rou+1,' round left!');
- End;
- If ((Up(A)='PAPER') or (Up(A)='P')) and (B='Scrissor') then
- Begin
- v:=v+1;
- Write('I choose '); TextColor(e); Write(B); TextColor(s);
- Writeln(', I win!!!'); y:=y+1;
- Delay(750); n3:=n3+1;
- Writeln(x,'-',y,'!!!'); rou:=rou+1;
- If ro-rou<0 then
- Begin
- TextColor(e);
- Writeln('Battle over!');
- TextColor(s);
- End
- else
- Writeln(ro-rou+1,' round left!');
- End;
- If ((Up(A)='PAPER') or (Up(A)='P')) and (B='Rock') then
- Begin
- v:=v+1;
- Write('I choose '); TextColor(e); Write(B); TextColor(s);
- Writeln(', You win!!!'); x:=x+1;
- Delay(750); n2:=n2+1;
- Writeln(x,'-',y,'!!!'); rou:=rou+1;
- If ro-rou<0 then
- Begin
- TextColor(e);
- Writeln('Battle over!');
- TextColor(s);
- End
- else
- Writeln(ro-rou+1,' round left!');
- End;
- If ((Up(A)='SCRISSOR') or (Up(A)='S')) and (B='Scrissor') then
- Begin
- o:=o+1;
- Write('I choose '); TextColor(e); Write(B); TextColor(s);
- Writeln(', Its a tie!!!');
- Delay(750); o1:=o1+1;
- Writeln(x,'-',y,'!!!'); rou:=rou+1;
- If ro-rou<0 then
- Begin
- TextColor(e);
- Writeln('Battle over!');
- TextColor(s);
- End
- else
- Writeln(ro-rou,' round left!');
- End;
- If ((Up(A)='SCRISSOR') or (Up(A)='S')) and (B='Rock') then
- Begin
- o:=o+1;
- Write('I choose '); TextColor(e); Write(B); TextColor(s);
- Writeln(', I win!!!'); y:=y+1;
- Delay(750); o3:=o3+1;
- Writeln(x,'-',y,'!!!'); rou:=rou+1;
- If ro-rou<0 then
- Begin
- TextColor(e);
- Writeln('Battle over!');
- TextColor(s);
- End
- else
- Writeln(ro-rou,' round left!');
- End;
- If ((Up(A)='SCRISSOR') or (Up(A)='S')) and (B='Paper') then
- Begin
- o:=o+1;
- Write('I choose '); TextColor(e); Write(B); TextColor(s);
- Writeln(', You win!!!'); x:=x+1;
- Delay(750); o2:=o2+1;
- Writeln(x,'-',y,'!!!'); rou:=rou+1;
- If ro-rou<0 then
- Begin
- TextColor(e);
- Writeln('Battle over!');
- TextColor(s);
- End
- else
- Writeln(ro-rou,' round left!');
- End;
- End;
- Write('Ok!!!'); Delay(1000);
- Writeln(' Its so fun while playing with you!');
- Delay(1000);
- Writeln('The final result is ',x,'-',y,'!!!');
- If x>y then
- Begin
- Writeln('You won the whole match!');
- Delay(1000); Writeln('Congratulation!');
- End;
- If x<y then
- Begin
- Writeln('I win the whole match!');
- Delay(1000); Writeln('Better luck next time fellas!');
- End;
- If x=y then
- Begin
- Writeln('Its a tie!');
- Delay(1000); Writeln('I will beat you at the next time LOL');
- End;
- Write('If you want to see the result of the match, type "');
- TextColor(e); Write('Result'); TextColor(s);Writeln('" then Enter');
- Write('If you want to exit now, type "');
- TextColor(e); Write('skip');TextColor(s); Writeln('" then Enter');
- TextColor(e); Readln(A); TextColor(s);
- If Up(A)='RESULT' then
- Begin
- TextColor(e); Writeln(x,'-',y); TextColor(s);
- Writeln('In the match, you choose: ');
- Write('Rock: ');TextColor(f);Write(m); TextColor(s);
- Write(' time(s); win: '); TextColor(f); Write(m2); TextColor(s);
- Write('; tie: ');TextColor(f); Write(m1); TextColor(s); Write('; lose: ');
- TextColor(f); Writeln(m3); TextColor(s);
- Write('Scrissor: '); TextColor(f); Write(o); TextColor(s);
- Write(' time(s); win: '); TextColor(f); Write(o2); TextColor(s);
- Write('; tie: '); TextColor(f); Write(o1); TextColor(s);
- Write('; lose: '); TextColor(f); Writeln(o3); TextColor(s);
- Write('Paper: '); TextColor(f); Write(n); TextColor(s);
- Write(' time(s); win: '); TextColor(f); Write(n2); TextColor(s);
- Write('; tie: ');TextColor(f); Write(n1); TextColor(s);
- Write('; lose: '); TextColor(f); Writeln(n3); TextColor(s);
- Write('Press enter...'); Readln;
- End;
- Writeln('Press any key to exit!'); Repeat Until KeyPressed;
- End;
- Procedure Infinity;
- Begin
- clrscr;
- Delay(500);
- Randomize;
- Write('Remember, type "'); TextColor(e); Write('Stop'); TextColor(s);
- Writeln('" when you want to stop playing');
- C:='Continue'; x:=0; y:=0; N:=3; m:=0; v:=0; o:=0; m1:=0;
- m2:=0; m3:=0; n1:=0; n2:=0; n3:=0; o1:=0; o2:=0; o3:=0;
- While (C<>'Stop') and (C<>'stop') do
- Begin
- Write('You choose: '); TextColor(e); Readln(A); TextColor(s);
- i:=Random(N);
- Case i of
- 0: B:='Rock';
- 1: B:='Paper';
- 2: B:='Scrissor';
- End;
- If ((Up(A)='ROCK') or (Up(A)='R')) and (B='Rock') then
- Begin
- m:=m+1;
- Write('I choose '); TextColor(e); Write(B);
- TextColor(s); Writeln(', Its a tie!!!');
- Delay(750); m1:=m1+1;
- Writeln(x,'-',y,'!!!');
- End;
- If ((Up(A)='ROCK') or (Up(A)='R')) and (B='Paper') then
- Begin
- m:=m+1;
- Write('I choose '); TextColor(e); Write(B); TextColor(s);
- Writeln(', I win!!!'); y:=y+1;
- Delay(750); m3:=m3+1;
- Writeln(x,'-',y,'!!!');
- End;
- If ((Up(A)='ROCK') or (Up(A)='R')) and (B='Scrissor') then
- Begin
- Write('I choose '); TextColor(e); Write(B); TextColor(s);
- Writeln(', You win!!!'); x:=x+1;
- Delay(750); m2:=m2+1;
- Writeln(x,'-',y,'!!!');
- End;
- If ((Up(A)='PAPER') or (Up(A)='P')) and (B='Paper') then
- Begin
- v:=v+1;
- Write('I choose '); TextColor(e); Write(B); TextColor(s);
- Writeln(', Its a tie!!!');
- Delay(750); n1:=n1+1;
- Writeln(x,'-',y,'!!!');
- End;
- If ((Up(A)='PAPER') or (Up(A)='P')) and (B='Scrissor') then
- Begin
- v:=v+1;
- Write('I choose '); TextColor(e); Write(B); TextColor(s);
- Writeln(', I win!!!'); y:=y+1;
- Delay(750); n3:=n3+1;
- Writeln(x,'-',y,'!!!');
- End;
- If ((Up(A)='PAPER') or (Up(A)='P')) and (B='Paper') then
- Begin
- v:=v+1;
- Write('I choose '); TextColor(e); Write(B); TextColor(s);
- Writeln(', You win!!!'); x:=x+1;
- Delay(750); n2:=n2+1;
- Writeln(x,'-',y,'!!!');
- End;
- If ((Up(A)='SCRISSOR') or (Up(A)='S')) and (B='Scrissor') then
- Begin
- o:=o+1;
- Write('I choose '); TextColor(e); Write(B); TextColor(s);
- Writeln(', Its a tie!!!');
- Delay(750); o1:=o1+1;
- Writeln(x,'-',y,'!!!');
- End;
- If ((Up(A)='SCRISSOR') or (Up(A)='S')) and (B='Rock') then
- Begin
- o:=o+1;
- Write('I choose '); TextColor(e); Write(B); TextColor(s);
- Writeln(', I win!!!'); y:=y+1;
- Delay(750); o3:=o3+1;
- Writeln(x,'-',y,'!!!');
- End;
- If ((Up(A)='SCRISSOR') or (Up(A)='S')) and (B='Paper') then
- Begin
- o:=o+1;
- Write('I choose '); TextColor(e); Write(B); TextColor(s);
- Writeln(', You win!!!'); x:=x+1;
- Delay(750); o2:=o2+1;
- Writeln(x,'-',y,'!!!');
- End;
- C:=A;
- End;
- Write('Ok!!!'); Delay(1000);
- Writeln(' Its so fun while playing with you!');
- Delay(1000);
- Writeln('The final result is ',x,'-',y,'!!!');
- If x>y then
- Begin
- Writeln('You won the whole match!');
- Delay(1000); Writeln('Congratulation!');
- End;
- If x<y then
- Begin
- Writeln('I win the whole match!');
- Delay(1000); Writeln('Better luck next time fellas!');
- End;
- If x=y then
- Begin
- Writeln('Its a tie!');
- Delay(1000); Writeln('I will beat you at the next time LOL');
- End;
- Write('If you want to see the result of the match, type "');
- TextColor(e); Write('Result'); TextColor(s);Writeln('" then Enter');
- Write('If you want to exit now, type "');
- TextColor(e); Write('skip');TextColor(s); Writeln('" then Enter');
- TextColor(e); Readln(A); TextColor(s);
- If (A='Result') or (A='result') then
- Begin
- TextColor(e); Writeln(x,'-',y); TextColor(s);
- Writeln('In the match, you choose: ');
- Write('Rock: ');TextColor(f);Write(m); TextColor(s);
- Write(' time(s); win: '); TextColor(f); Write(m2); TextColor(s);
- Write('; tie: ');TextColor(f); Write(m1); TextColor(s); Write('; lose: ');
- TextColor(f); Writeln(m3); TextColor(s);
- Write('Scrissor: '); TextColor(f); Write(o); TextColor(s);
- Write(' time(s); win: '); TextColor(f); Write(o2); TextColor(s);
- Write('; tie: '); TextColor(f); Write(o1); TextColor(s);
- Write('; lose: '); TextColor(f); Writeln(o3); TextColor(s);
- Write('Paper: '); TextColor(f); Write(n); TextColor(s);
- Write(' time(s); win: '); TextColor(f); Write(n2); TextColor(s);
- Write('; tie: ');TextColor(f); Write(n1); TextColor(s);
- Write('; lose: '); TextColor(f); Writeln(n3); TextColor(s);
- Write('Press enter...'); Readln;
- End;
- Writeln('Press any key to exit!'); Repeat Until KeyPressed;
- End;
- Procedure Loading_Screen;
- Begin
- TextColor(s);
- clrscr;
- Writeln('LOADING...');
- Write('This game was made by '); TextColor(e);
- Write('Tran Viet Anh'); TextColor(s); Write(' AKA ');
- TextColor(e); Writeln('Wade Rollins'); TextColor(s);
- Write('If you found any bugs pls send to my email: '); TextColor(e);
- Writeln('pewdiepievietanh@gmail.com'); TextColor(s);
- Delay(11000); Gotoxy(10,1);
- Write('Game loaded');
- Delay(2000);
- End;
- Procedure Playing;
- Begin
- clrscr; Write('Choose mode(Infinity/Round): '); Readln(A);
- While (A<>'Infinity') and (A<>'infinity') and (A<>'Round') and (A<>'round') do
- Begin
- Write('Choose again!!!: '); Readln(A);
- End;
- If (A='Infinity') or (A='infinity') then Infinity;
- If (A='Round') or (A='round') then Round;
- End;
- Begin
- clrscr;
- TC1:='Gray'; TC2:='Yellow'; TC3:='Brown'; Di:='easy';
- Assign(t,'OPTI.txt');
- Reset(t);
- Read(t,s,e,f);
- Enter_Name;
- Ask;
- If Up(A)='NO' then Denied;
- If Up(A)='YES' then
- Begin
- Allowed;
- Introduction;
- Choose;
- TextColor(e); Readln(A); TextColor(s);
- If Up(A)='OPTION' then Option;
- Writeln('Ready?? Press any key to continue!');
- Repeat Until KeyPressed;
- Loading_Screen;
- Playing;
- End;
- End.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement