Hi Dani, i am a computer programming student learning the Pascal

language. I wish to ask for your help in furnishing me with two pascal

games which i can study and and improve on, or probably writing my

own codes. I like the pseudocode for the games and the procedure for

writing this kind of Programs

thank you very much.
secret...

Recommended Answers

All 4 Replies

one starter game:

program guess;
uses crt;
var a,b,c:integer;
label 1,2;
begin
textbackground(green);
textcolor(white);
clrscr;
1:
c:=0;
writeln('guess a number from 1 to 1000');
randomize;
b:=random(1000)+1;
2:
readln(a);
inc(c);
if a<b then
begin
writeln('too little');
goto 2;
end;
if a>b then
begin 
writeln('too much');
goto 2;
end;
writeln('You found it! It took you ',c,' guesses to get it');
writeln;
goto 1;
end.

one bigger game:

program weee (input,output,save);
uses crt;
type a31415=array [1..10,1..10] of integer;
var save: text; a,b,d,e,str,hp,acr,def,str2,hp2,acr2,def2,qpoints,mlvl,nmonk,brnqd,frzns,frzqd,dhqd,rplqd,place,lvl,el,edl,c,z,emoney,hpl,acrl,strl,across,down,defl,aaa,bbb,ccc,ddd,stash,bombs,healpo: integer; ep,exp,test,neededexp: real; w,x,y,mon,anok,bnok,rpl,dh,boss: boolean; aaaaa,aaaab,aaaac,aaaad,aaaae,aaaaf,frzq,brnq,dhq,rplq,brnl,rpll: integer; a1,a2,a3,junk: char; land: a31415;
label 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,95,96,97,98,99,100,995,996,997,998,999,9999;
BEGIN
assign(save,'C:/x.txt');
lvl:=3;
neededexp:=1.3;
textbackground(green);
textcolor(white);
clrscr;
for a:=1 to 10 do                      {Copyright 2006, Edward Swernofsky}
    begin
    for b:=1 to 10 do
        begin
        c:=0;
        repeat
        inc(c);
        until c=5000000;
        randomize;
        land[a,b]:=(random(2)+1)-1;
        end;
    end;
for a:=1 to 3 do
    begin
    for b:=1 to 3 do
        begin
        land[a,b]:=1;
        end;
    end;
land[1,10]:=2;
land[10,1]:=2;
land[10,10]:=2;
across:=1;
down:=1;
brnl:=1;
rpll:=1;
writeln('your magic progresses as you gain levels');
4:
if y then goto 100;
hp:=100+10*lvl+10*hpl;
hp2:=100+10*el;
if bnok then
begin
bnok:=false;
goto 995;
end;
if mon then
begin
mon:=false;
goto 1;
end;
999:
place:=land[across,down];
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,1],' | ',land[2,1],' | ',land[3,1],' | ',land[4,1],' | ',land[5,1],' | ',land[6,1],' | ',land[7,1],' | ',land[8,1],' | ',land[9,1],' | ',land[10,1],' |');
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,2],' | ',land[2,2],' | ',land[3,2],' | ',land[4,2],' | ',land[5,2],' | ',land[6,2],' | ',land[7,2],' | ',land[8,2],' | ',land[9,2],' | ',land[10,2],' |');
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,3],' | ',land[2,3],' | ',land[3,3],' | ',land[4,3],' | ',land[5,3],' | ',land[6,3],' | ',land[7,3],' | ',land[8,3],' | ',land[9,3],' | ',land[10,3],' |'); 
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                          
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,4],' | ',land[2,4],' | ',land[3,4],' | ',land[4,4],' | ',land[5,4],' | ',land[6,4],' | ',land[7,4],' | ',land[8,4],' | ',land[9,4],' | ',land[10,4],' |');
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,5],' | ',land[2,5],' | ',land[3,5],' | ',land[4,5],' | ',land[5,5],' | ',land[6,5],' | ',land[7,5],' | ',land[8,5],' | ',land[9,5],' | ',land[10,5],' |'); 
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,6],' | ',land[2,6],' | ',land[3,6],' | ',land[4,6],' | ',land[5,6],' | ',land[6,6],' | ',land[7,6],' | ',land[8,6],' | ',land[9,6],' | ',land[10,6],' |');
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,7],' | ',land[2,7],' | ',land[3,7],' | ',land[4,7],' | ',land[5,7],' | ',land[6,7],' | ',land[7,7],' | ',land[8,7],' | ',land[9,7],' | ',land[10,7],' |');
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,8],' | ',land[2,8],' | ',land[3,8],' | ',land[4,8],' | ',land[5,8],' | ',land[6,8],' | ',land[7,8],' | ',land[8,8],' | ',land[9,8],' | ',land[10,8],' |'); 
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,9],' | ',land[2,9],' | ',land[3,9],' | ',land[4,9],' | ',land[5,9],' | ',land[6,9],' | ',land[7,9],' | ',land[8,9],' | ',land[9,9],' | ',land[10,9],' |');        
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,10],' | ',land[2,10],' | ',land[3,10],' | ',land[4,10],' | ',land[5,10],' | ',land[6,10],' | ',land[7,10],' | ',land[8,10],' | ',land[9,10],' | ',land[10,10],' |');
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');
writeln('1 is a city, 2 is a boss, and 0 is a hunting place');
writeln('you are at ',across,',',down);
if place=0 then
   begin
   writeln('type 1 to go hunting, and 2 to save or recover');
   readln(a);
   clrscr;
   if a=1 then goto 997;
   if a=2 then goto 996;
   goto 999;
   end;
if place=1 then
   begin
   writeln('type 1 to go shopping, 2 to move, 3 to save or recover, and 4 to see your stats');
   readln(a);
   clrscr;
   if a=1 then goto 998;
   if a=2 then goto 995;
   if a=3 then goto 996; 
   if a=4 then goto 95;
   goto 999;
   end;
if place=2 then
   begin
   textcolor(yellow);
   writeln('BBB OOO SSS SSS!');
   writeln('BBB OOO SSS SSS!');
   writeln('BBB OOO SSS SSS!');
   textcolor(white);
   el:=lvl*3;
   boss:=true;
   mon:=true;
   goto 4;
   end;      
if place=3 then
   begin
   textcolor(red);
   writeln('MMM EEE GGG AAA BBB OOO SSS SSS!');
   writeln('MMM EEE GGG AAA BBB OOO SSS SSS!');
   writeln('MMM EEE GGG AAA BBB OOO SSS SSS!');
   textcolor(white);
   el:=lvl*10;
   boss:=true;
   mon:=true;
   goto 4;
   end;
998:
   begin
   writeln('you have ',stash,' gp,');
   writeln;
   writeln('type 1 to buy a sword upgrade for 10000 gp,');
   writeln;                                    
   writeln('type 2 to buy a shield upgrade for 10000 gp,');
   writeln;
   writeln('type 3 to buy an eye glass upgrade for 10000 gp,');
   writeln;
   writeln('type 4 to buy a health potion for 5000 gp,');
   readln(a);
   clrscr;
   if a=1 then
      begin
      if stash>10000 then
         begin
         writeln('purchased!');
         inc(aaaaa);
         stash:=stash-10000;
         goto 998;
         end;
      end;
   if a=2 then
      begin
      if stash>10000 then
         begin
         writeln('purchased!');
         inc(aaaab);
         stash:=stash-10000;
         goto 998;
         end;
      end;
   if a=3 then
      begin
      if stash>10000 then
         begin
         writeln('purchased!');
         inc(aaaac);
         stash:=stash-10000;
         goto 998;
         end;
      end;
   if a=4 then
      begin
      if stash>5000 then
         begin
         writeln('purchased!');
         inc(healpo);
         stash:=stash-5000;
         goto 998;
         end;
      end;
   goto 999;
   end;
997:
   begin
   randomize;
   e:=random(100)+1;
   if e>20 then
      begin
      if e>40 then
         begin
         if e>60 then
            begin
            if e>70 then
               begin
                  if e>90 then
                     begin
                     if e>99 then
                        begin
                        textcolor(blue);
                        writeln('YOU LEVELED UP!!!!!!!!!'); 
                        textcolor(white);
                        writeln;
                        goto 96;
                        end;   
                     textcolor(blue);
                     writeln('YOU FOUND A TREASURE CHEST!!!!');
                     textcolor(white);
                     writeln;
                     stash:=stash+1000;
                     goto 999;
                     end;
               textcolor(blue);
               writeln('YOU FOUND A POTION!!!!'); 
               textcolor(white);
               writeln;
               healpo:=healpo+1;
               goto 999;
               end;
            textcolor(yellow);
            writeln('YOU DID NOT FIND ANYTHING!!!!!!!!');  
            textcolor(white);
            writeln;
            goto 999;
            end;
         writeln('YOU WERE ATTACKED!!!!!!!!!!!! -1         !!!!!!!!!');
         writeln;
         el:=lvl-1;
         mon:=true;
         goto 4;
         end;
      writeln('YOU WERE ATTACKED!!!!!!!!!!!! +1         !!!!!!!!!');
      writeln;
      el:=lvl+1;
      mon:=true;
      goto 4;
      end;
   writeln('YOU WERE ATTACKED!!!!!!!!!!!! Same lvl   !!!!!!!!!');
   writeln;
   el:=lvl;
   mon:=true;
   goto 4;
   end;
996:
   begin
   writeln('type 1 to save, 2 to recover and 3 to quit');
   readln(a);
   clrscr;
   if a=1 then
      begin
      rewrite(save);
      writeln(save,lvl,' ',stash,' ',exp,' ',neededexp,' ',acrl,' ',strl,' ',defl,' ',bombs,' ',healpo,' ',hpl,' ',aaaaa,' ',aaaab,' ',aaaac,' ',aaaad,' ',brnq,' ',frzq,' ',dhq,' ',rplq,' ',brnl,' ',rpll,' ',across,' ',down);
      close(save);
      goto 999;
      end;
   if a=2 then
      begin
      reset(save);
      readln(save,lvl,stash,exp,neededexp,acrl,strl,defl,bombs,healpo,hpl,aaaaa,aaaab,aaaac,aaaad,brnq,frzq,dhq,rplq,brnl,rpll,across,down);
      close(save);
      brnqd:=brnq;
      frzqd:=frzq;
      dhqd:=dhq;
      rplqd:=rplq;
      goto 4;
      end;
   if a=3 then goto 999;
   end;
95:
   begin
   writeln;                         
   writeln('your level is ',lvl);

   writeln('you have ',hp,' health');
   writeln('you have ',strl,' strength');
   writeln('you have ',acrl,' acuracy');
   writeln('you have ',defl,' defence');

   writeln('you have ',brnq,' burn spells per battle');
   writeln('you have ',frzq,' freeze spells per battle');
   writeln('you have ',dhq,' double hit spells per battle');
   writeln('you have ',rplq,' repel spells per battle');

   writeln('your burn level is ',brnl);                   
   writeln('your repel level is ',rpll);

   writeln('you have ',stash,' gp');      
   writeln('your sword lvl is ',aaaaa);
   writeln('your shield lvl is ',aaaab);
   writeln('your eyeglass lvl is ',aaaac);
   writeln('you have ',healpo,' health potions');

   writeln('you have ',round(exp),' experience');
   writeln('you need ',round((neededexp-exp)),' more experience to get to the next level');
   writeln;
   readln;
   clrscr;
   goto 999;
   end;
1:
if hp2<1 then
   begin
   if boss then
   begin
   boss:=false;
   writeln('you beat a boss!!!!!!!');
   emoney:=el*100;
   inc(qpoints);
   if (qpoints mod 5)=0 then land[10,10]:=3;
   end
   else emoney:=el*50;
   writeln('you got ',emoney,' gp');
   stash:=stash+emoney;
   ep:=1.1;
   brnqd:=brnq;
   frzqd:=frzq;
   dhqd:=dhq;
   rplqd:=rplq;
   for a:=1 to el do
      begin
      ep:=ep*1.1;
      end;
   exp:=exp+ep;
   writeln('you win!');
   if exp>neededexp then
      begin
96:
      inc(lvl);
      exp:=0;
      writeln;
      writeln('YOU GAINED A LEVEL!!!!!!!');
      writeln;
      neededexp:=neededexp*1.4;
      y:=true;
      end;
   bnok:=true;
   readln;
   clrscr;
   goto 4;
   end;
if hp<1 then
   begin
   brnqd:=brnq;
   frzqd:=frzq;
   dhqd:=dhq;
   rplqd:=rplq;
   textcolor(red);
   writeln('you lose!');
   textcolor(white);
   lvl:=lvl-1;
   exp:=0;
   neededexp:=1.3;
   for a:=1 to (lvl-2) do neededexp:=neededexp*1.3;
   bnok:=true;
   readln;
   goto 4;
   end;
   if anok then
   begin
995: 
anok:=false;
place:=land[across,down];
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,1],' | ',land[2,1],' | ',land[3,1],' | ',land[4,1],' | ',land[5,1],' | ',land[6,1],' | ',land[7,1],' | ',land[8,1],' | ',land[9,1],' | ',land[10,1],' |');
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,2],' | ',land[2,2],' | ',land[3,2],' | ',land[4,2],' | ',land[5,2],' | ',land[6,2],' | ',land[7,2],' | ',land[8,2],' | ',land[9,2],' | ',land[10,2],' |');
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,3],' | ',land[2,3],' | ',land[3,3],' | ',land[4,3],' | ',land[5,3],' | ',land[6,3],' | ',land[7,3],' | ',land[8,3],' | ',land[9,3],' | ',land[10,3],' |'); 
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                          
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,4],' | ',land[2,4],' | ',land[3,4],' | ',land[4,4],' | ',land[5,4],' | ',land[6,4],' | ',land[7,4],' | ',land[8,4],' | ',land[9,4],' | ',land[10,4],' |');
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,5],' | ',land[2,5],' | ',land[3,5],' | ',land[4,5],' | ',land[5,5],' | ',land[6,5],' | ',land[7,5],' | ',land[8,5],' | ',land[9,5],' | ',land[10,5],' |'); 
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,6],' | ',land[2,6],' | ',land[3,6],' | ',land[4,6],' | ',land[5,6],' | ',land[6,6],' | ',land[7,6],' | ',land[8,6],' | ',land[9,6],' | ',land[10,6],' |');
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,7],' | ',land[2,7],' | ',land[3,7],' | ',land[4,7],' | ',land[5,7],' | ',land[6,7],' | ',land[7,7],' | ',land[8,7],' | ',land[9,7],' | ',land[10,7],' |');
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,8],' | ',land[2,8],' | ',land[3,8],' | ',land[4,8],' | ',land[5,8],' | ',land[6,8],' | ',land[7,8],' | ',land[8,8],' | ',land[9,8],' | ',land[10,8],' |'); 
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,9],' | ',land[2,9],' | ',land[3,9],' | ',land[4,9],' | ',land[5,9],' | ',land[6,9],' | ',land[7,9],' | ',land[8,9],' | ',land[9,9],' | ',land[10,9],' |');        
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,10],' | ',land[2,10],' | ',land[3,10],' | ',land[4,10],' | ',land[5,10],' | ',land[6,10],' | ',land[7,10],' | ',land[8,10],' | ',land[9,10],' | ',land[10,10],' |');
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');
writeln('1 is a city and 0 is a hunting place');
writeln('you are at ',across,',',down);
   writeln('type 1 to go up, 2 to go down, 3 to go left, 4 to go right, and 5 to stay where you are');
   readln(a);
   if a=1 then
      begin
      if down=1 then
      begin
      clrscr;
      goto 995;
      end;
      down:=down-1;
      clrscr;    
      goto 999;
      end;   
   if a=2 then
      begin      
      if down=10 then
      begin
      clrscr;
      goto 995;
      end;
      down:=down+1;
      clrscr;    
      goto 999;
      end;
   if a=3 then
      begin                    
      if across=1 then
      begin
      clrscr;
      goto 995;
      end;
      across:=across-1;
      clrscr;    
      goto 999;
      end;
   if a=4 then
      begin     
      if across=10 then 
      begin
      clrscr;
      goto 995;
      end;
      across:=across+1;
      clrscr;    
      goto 999;
      end;
      clrscr;
   if a=5 then goto 999;
   goto 995;
   end;
writeln('type 1 to attack');
if healpo>0 then writeln('type 2 to use potion'); 
if brnq>0 then writeln('type 3 to use burn');
if frzq>0 then writeln('type 4 to use freeze');
if dhq>0 then writeln('type 5 to use double hit');
if rplq>0 then writeln('type 6 to use repel');
readln(a);
clrscr;
if a=1 then goto 3;
if a=2 then
   begin
   if healpo>0 then
      begin
      healpo:=healpo-1;
      hp:=hp+2*el+50;
      goto 1;
      end;
   end;
if a=3 then
   begin  
   if brnqd>0 then
   begin
   brnqd:=brnqd-1;
   randomize;
   str:=brnl*10+(random(5)+1)-1;
   goto 9999;
   end;
   end;
if a=4 then
   begin
   if frzqd>0 then
   begin
   frzqd:=frzqd-1;
   inc(frzns);
   end;
   end;
if a=5 then
   begin
   if dhqd>0 then
   begin      
   dhqd:=dhqd-1;
   dh:=true;
   goto 3;
   end;
   end;
if a=6 then
   begin
   if rplqd>0 then
   begin    
   rplqd:=rplqd-1;
   rpl:=true;
   goto 3;
   end;
   end;
goto 1;
3:
writeln('  YOU                       HIM');
writeln('---------------------------------');
writeln('  ***        //      ||     ***  ');
writeln(' *****      //       ||    ***** ');
writeln('  ***      //        ||     ***  ');
writeln('************         ************');
writeln('***********           ***********');
writeln('*******                   *******');
writeln('*******                   *******');
writeln('**   **                   **   **');
writeln('**   **                   **   **');
writeln('**   **                   **   **');
writeln('---------------------------------');
z:=1;
goto 5;
6:
writeln('   YOU                      HIM');
writeln('---------------------------------');
writeln('   ***        //     ||     ***  ');
writeln('  *****      //      ||    ***** ');
writeln('   ***      //       ||     ***  ');
writeln(' ************        ************');
writeln(' ***********          ***********');
writeln(' *******                  *******');
writeln(' *******                  *******');
writeln(' **   **                  **   **');
writeln(' **   **                  **   **');
writeln(' **   **                  **   **');
writeln('---------------------------------');
inc(z);
goto 5;
7:
writeln('    YOU                     HIM');
writeln('---------------------------------');
writeln('    ***        //    ||     ***  ');
writeln('   *****      //     ||    ***** ');
writeln('    ***      //      ||     ***  ');
writeln('  ************       ************');
writeln('  ***********         ***********');
writeln('  *******                 *******');
writeln('  *******                 *******');
writeln('  **   **                 **   **');
writeln('  **   **                 **   **');
writeln('  **   **                 **   **');
writeln('---------------------------------');
inc(z);
goto 5;
8:
writeln('      YOU                   HIM');
writeln('---------------------------------');
writeln('      ***        //  ||     ***  ');
writeln('     *****      //   ||    ***** ');
writeln('      ***      //    ||     ***  ');
writeln('    ************     ************');
writeln('    ***********       ***********');
writeln('    *******               *******');
writeln('    *******               *******');
writeln('    **   **               **   **');
writeln('    **   **               **   **');
writeln('    **   **               **   **');
writeln('---------------------------------');
inc(z);
goto 5;
9:
writeln('       YOU                  HIM');
writeln('---------------------------------');
writeln('       ***        // ||     ***  ');
writeln('      *****      //  ||    ***** ');
writeln('       ***      //   ||     ***  ');
writeln('     ************    ************');
writeln('     ***********      ***********');
writeln('     *******              *******');
writeln('     *******              *******');
writeln('     **   **              **   **');
writeln('     **   **              **   **');
writeln('     **   **              **   **');
writeln('---------------------------------');
inc(z);
goto 5;
10:
writeln('        YOU                 HIM');
writeln('---------------------------------');
writeln('        ***        //||     ***  ');
writeln('       *****      // ||    ***** ');
writeln('        ***      //  ||     ***  ');
writeln('      ************   ************');
writeln('      ***********     ***********');
writeln('      *******             *******');
writeln('      *******             *******');
writeln('      **   **             **   **');
writeln('      **   **             **   **');
writeln('      **   **             **   **');
writeln('---------------------------------');
inc(z);
goto 5;
11:
writeln('         YOU                HIM');
writeln('---------------------------------');
writeln('         ***        //|     ***  ');
writeln('        *****      //||    ***** ');
writeln('         ***      // ||     ***  ');
writeln('       ************  ************');
writeln('       ***********    ***********');
writeln('       *******            *******');
writeln('       *******            *******');
writeln('       **   **            **   **');
writeln('       **   **            **   **');
writeln('       **   **            **   **');
writeln('---------------------------------');
inc(z);
goto 5;
12:
writeln('          YOU               HIM');
writeln('---------------------------------');
writeln('          ***        //     ***  ');
writeln('         *****      //|    ***** ');
writeln('          ***      //||     ***  ');
writeln('        ************ ************');
writeln('        ***********   ***********');
writeln('        *******           *******');
writeln('        *******           *******');
writeln('        **   **           **   **');
writeln('        **   **           **   **');
writeln('        **   **           **   **');
writeln('---------------------------------');
inc(z);
goto 5;
13:
writeln('          YOU               HIM');
writeln('---------------------------------');
writeln('          ***            || ***  ');
writeln('         *****           ||***** ');
writeln('          ***            || ***  ');
writeln('        ***********----------****');
writeln('        ************---------****');
writeln('        *******           *******');
writeln('        *******           *******');
writeln('        **   **           **   **');
writeln('        **   **           **   **');
writeln('        **   **           **   **');
writeln('---------------------------------');
inc(z);
goto 5;
14:
writeln('          YOU               HIM');
writeln('---------------------------------');
writeln('          ***         ||    ***  ');
writeln('         *****        ||   ***** ');
writeln('          ***         ||    ***  ');
writeln('        ************\ ***********');
writeln('        *********** \\ **********');
writeln('        *******      \\   *******');
writeln('        *******       \\  *******');
writeln('        **   **        \\ **   **');
writeln('        **   **           **   **');
writeln('        **   **           **   **');
writeln('---------------------------------');
inc(z);
goto 5;
15:
writeln('        YOU                 HIM');
writeln('---------------------------------');
writeln('        ***          ||     ***  ');
writeln('       *****         ||    ***** ');
writeln('        ***          ||     ***  ');
writeln('      ************\  ************');
writeln('      ************\\  ***********');
writeln('      *******      \\     *******');
writeln('      *******       \\    *******');
writeln('      **   **        \\   **   **');
writeln('      **   **             **   **');
writeln('      **   **             **   **');
writeln('---------------------------------');
inc(z);
goto 5;
16:
writeln('      YOU                   HIM');
writeln('---------------------------------');
writeln('      ***            ||     ***  ');
writeln('     *****           ||    ***** ');
writeln('      ***            ||     ***  ');
writeln('    ************\    ************');
writeln('    *********** \\    ***********');
writeln('    *******      \\       *******');
writeln('    *******       \\      *******');
writeln('    **   **        \\     **   **');
writeln('    **   **               **   **');
writeln('    **   **               **   **');
writeln('---------------------------------');
inc(z);
goto 5;
17:
writeln('     YOU                    HIM');
writeln('---------------------------------');
writeln('     ***             ||     ***  ');
writeln('    *****            ||    ***** ');
writeln('     ***             ||     ***  ');
writeln('   ***********_______************');
writeln('   ************______ ***********');
writeln('   *******                *******');
writeln('   *******                *******');
writeln('   **   **                **   **');
writeln('   **   **                **   **');
writeln('   **   **                **   **');
writeln('---------------------------------');
inc(z);
goto 5;
18:
writeln('   YOU                      HIM');
writeln('---------------------------------');
writeln('   ***         //    ||     ***  ');
writeln('  *****       //     ||    ***** ');
writeln('   ***       //      ||     ***  ');
writeln(' *************       ************');
writeln(' ************         ***********');
writeln(' *******                  *******');
writeln(' *******                  *******');
writeln(' **   **                  **   **');
writeln(' **   **                  **   **');
writeln(' **   **                  **   **');
writeln('---------------------------------');
inc(z);
goto 5;
19:
writeln('  YOU                       HIM');
writeln('---------------------------------');
writeln('  ***     ||         ||     ***  ');
writeln(' *****    ||         ||    ***** ');
writeln('  ***     ||         ||     ***  ');
writeln('************         ************');
writeln('***********           ***********');
writeln('*******                   *******');
writeln('*******                   *******');
writeln('**   **                   **   **');
writeln('**   **                   **   **');
writeln('**   **                   **   **');
writeln('---------------------------------');
inc(z);
goto 5;        
20:
writeln('  YOU                      HIM');
writeln('---------------------------------');
writeln('  ***     ||        ||     ***  ');
writeln(' *****    ||        ||    ***** ');
writeln('  ***     ||        ||     ***  ');
writeln('************        ************');
writeln('***********          ***********');
writeln('*******                  *******');
writeln('*******                  *******');
writeln('**   **                  **   **');
writeln('**   **                  **   **');
writeln('**   **                  **   **');
writeln('---------------------------------');
inc(z);
goto 5;
21:
writeln('  YOU                     HIM');
writeln('---------------------------------');
writeln('  ***     ||    \\        ***  ');
writeln(' *****    ||     \\      ***** ');
writeln('  ***     ||      \\      ***  ');
writeln('************       ************');
writeln('***********         ***********');
writeln('*******                 *******');
writeln('*******                 *******');
writeln('**   **                 **   **');
writeln('**   **                 **   **');
writeln('**   **                 **   **');
writeln('---------------------------------');
inc(z);
goto 5;
22:
writeln('  YOU                    HIM');
writeln('---------------------------------');
writeln('  ***     ||   \\        ***  ');
writeln(' *****    ||    \\      ***** ');
writeln('  ***     ||     \\      ***  ');
writeln('************      ************');
writeln('***********        ***********');
writeln('*******                *******');
writeln('*******                *******');
writeln('**   **                **   **');
writeln('**   **                **   **');
writeln('**   **                **   **');
writeln('---------------------------------');
inc(z);
goto 5;
23:
writeln('  YOU                   HIM');
writeln('---------------------------------');
writeln('  ***     ||  \\        ***  ');
writeln(' *****    ||   \\      ***** ');
writeln('  ***     ||    \\      ***  ');
writeln('************     ************');
writeln('***********       ***********');
writeln('*******               *******');
writeln('*******               *******');
writeln('**   **               **   **');
writeln('**   **               **   **');
writeln('**   **               **   **');
writeln('---------------------------------');
inc(z);
goto 5;
24:
writeln('  YOU                  HIM');
writeln('---------------------------------');
writeln('  ***     || \\        ***  ');
writeln(' *****    ||  \\      ***** ');
writeln('  ***     ||   \\      ***  ');
writeln('************    ************');
writeln('***********      ***********');
writeln('*******              *******');
writeln('*******              *******');
writeln('**   **              **   **');
writeln('**   **              **   **');
writeln('**   **              **   **');
writeln('---------------------------------');
inc(z);
goto 5;
25:
writeln('  YOU                 HIM');
writeln('---------------------------------');
writeln('  ***     ||\\        ***  ');
writeln(' *****    || \\      ***** ');
writeln('  ***     ||  \\      ***  ');
writeln('************   ************');
writeln('***********     ***********');
writeln('*******             *******');
writeln('*******             *******');
writeln('**   **             **   **');
writeln('**   **             **   **');
writeln('**   **             **   **');
writeln('---------------------------------');
inc(z);
goto 5;
26:
writeln('  YOU              HIM');
writeln('---------------------------------');
writeln('  ***     |\\        ***  ');
writeln(' *****    ||\\      ***** ');
writeln('  ***     || \\      ***  ');
writeln('************  ************');
writeln('***********    ***********');
writeln('*******            *******');
writeln('*******            *******');
writeln('**   **            **   **');
writeln('**   **            **   **');
writeln('**   **            **   **');
writeln('---------------------------------');
inc(z);
goto 5;
27:
writeln('  YOU               HIM');
writeln('---------------------------------');
writeln('  ***     \\        ***  ');
writeln(' *****    |\\      ***** ');
writeln('  ***     ||\\      ***  ');
writeln('************ ************');
writeln('***********   ***********');
writeln('*******           *******');
writeln('*******           *******');
writeln('**   **           **   **');
writeln('**   **           **   **');
writeln('**   **           **   **');
writeln('---------------------------------');
inc(z);
goto 5;
28:
writeln('  YOU               HIM');
writeln('---------------------------------');
writeln('  ***     ||        ***  ');
writeln(' *****    ||       ***** ');
writeln('  ***     ||        ***  ');
writeln('****----------***********');
writeln('****---------************');
writeln('*******           *******');
writeln('*******           *******');
writeln('**   **           **   **');
writeln('**   **           **   **');
writeln('**   **           **   **');
writeln('---------------------------------');
inc(z);
goto 5;
29:
writeln('  YOU               HIM');
writeln('---------------------------------');
writeln('  ***    ||         ***  ');
writeln(' *****   ||        ***** ');
writeln('  ***    ||         ***  ');
writeln('*********** /************');
writeln('********** // ***********');
writeln('*******   //      *******');
writeln('*******  //       *******');
writeln('**   ** //        **   **');
writeln('**   **           **   **');
writeln('**   **           **   **');
writeln('---------------------------------');
inc(z);
goto 5;   
30:
writeln('  YOU                HIM');
writeln('---------------------------------');
writeln('  ***    ||          ***  ');
writeln(' *****   ||         ***** ');
writeln('  ***    ||          ***  ');
writeln('***********  /************');
writeln('**********  // ***********');
writeln('*******    //      *******');
writeln('*******   //       *******');
writeln('**   **  //        **   **');
writeln('**   **            **   **');
writeln('**   **            **   **');
writeln('---------------------------------');
inc(z);
goto 5;
31:
writeln('  YOU                 HIM');
writeln('---------------------------------');
writeln('  ***    ||           ***  ');
writeln(' *****   ||          ***** ');
writeln('  ***    ||           ***  ');
writeln('***********   /************');
writeln('**********   // ***********');
writeln('*******     //      *******');
writeln('*******    //       *******');
writeln('**   **   //        **   **');
writeln('**   **             **   **');
writeln('**   **             **   **');
writeln('---------------------------------');
inc(z);
goto 5;
32:
writeln('  YOU                   HIM');
writeln('---------------------------------');
writeln('  ***    ||             ***  ');
writeln(' *****   ||            ***** ');
writeln('  ***    ||             ***  ');
writeln('***********     /************');
writeln('**********     // ***********');
writeln('*******       //      *******');
writeln('*******      //       *******');
writeln('**   **     //        **   **');
writeln('**   **               **   **');
writeln('**   **               **   **');
writeln('---------------------------------');
inc(z);
goto 5;
33:
writeln('  YOU                    HIM');
writeln('---------------------------------');
writeln('  ***     ||             ***  ');
writeln(' *****    ||            ***** ');
writeln('  ***     ||             ***  ');
writeln('************_______***********');
writeln('*********** ______************');
writeln('*******                *******');
writeln('*******                *******');
writeln('**   **                **   **');
writeln('**   **                **   **');
writeln('**   **                **   **');
writeln('---------------------------------');
inc(z);
goto 5;
34:
writeln('  YOU                     HIM');
writeln('---------------------------------');
writeln('  ***     ||    \\        ***  ');
writeln(' *****    ||     \\      ***** ');
writeln('  ***     ||      \\      ***  ');
writeln('************       ************');
writeln('***********         ***********');
writeln('*******                 *******');
writeln('*******                 *******');
writeln('**   **                 **   **');
writeln('**   **                 **   **');
writeln('**   **                 **   **');
writeln('---------------------------------');
inc(z);
goto 5;
35:
writeln('  YOU                      HIM');
writeln('---------------------------------');
writeln('  ***     ||        ||     ***  ');
writeln(' *****    ||        ||    ***** ');
writeln('  ***     ||        ||     ***  ');
writeln('************        ************');
writeln('***********          ***********');
writeln('*******                  *******');
writeln('*******                  *******');
writeln('**   **                  **   **');
writeln('**   **                  **   **');
writeln('**   **                  **   **');
writeln('---------------------------------');
inc(z);       
goto 5;
36:
writeln('  YOU                       HIM');
writeln('---------------------------------');
writeln('  ***     ||         ||     ***  ');
writeln(' *****    ||         ||    ***** ');
writeln('  ***     ||         ||     ***  ');
writeln('************         ************');
writeln('***********           ***********');
writeln('*******                   *******');
writeln('*******                   *******');
writeln('**   **                   **   **');
writeln('**   **                   **   **');
writeln('**   **                   **   **');
writeln('---------------------------------');
inc(z);
5:
c:=0;
repeat
inc(c);
until c=1000000;
clrscr;
if z=1 then goto 6;
if z=2 then goto 7;
if z=3 then goto 8;
if z=4 then goto 9;
if z=5 then goto 10;
if z=6 then goto 11;
if z=7 then goto 12;
if z=8 then goto 13;
if z=9 then goto 14;
if z=10 then goto 15;
if z=11 then goto 16;
if z=12 then goto 17;
if z=13 then goto 18;
if z=14 then goto 19;
if z=15 then goto 21;
if z=16 then goto 22;
if z=17 then goto 23;
if z=18 then goto 25;
if z=19 then goto 26;
if z=20 then goto 27;
if z=21 then goto 28;
if z=22 then goto 29;
if z=23 then goto 30;
if z=24 then goto 31;
if z=25 then goto 32;
if z=26 then goto 33;
if z=27 then goto 34;
if z=28 then goto 35;
if z=29 then goto 36;
randomize;
acr:=random(100+lvl+acrl)+1;
acr:=round(acr*0.1*(10+aaaac));
if acr>33 then
   begin
   c:=0;
   repeat
   inc(c);
   until c=5000000;
   randomize;
   str:=random(10+lvl+strl)+1;
   str:=round(str*0.1*(10+aaaaa));
   if dh then
      begin
      dh:=false;
      str:=str*2;
      end;
   x:=true;
   if acr<66 then
      begin
      goto 99;
      98:    
      c:=0;
      repeat
      inc(c);
      until c=5000000;
      randomize;
      def2:=random(7+2*el)+1;
      str:=str-def2;
      if str<0 then str:=0;
      end;
   9999:
   hp2:=hp2-str;
   writeln('you did ',str,' damage');
   writeln('enemy health = ',hp2);
   end
else writeln('you missed');
writeln;
c:=0;
repeat
inc(c);
until c=5000000;
if frzns>0 then
begin
frzns:=frzns-1;
goto 1;
end;
37:
randomize;
acr2:=random(100+round(2*el))+1;
if acr2>33 then
begin
randomize;
str2:=random(10+round(2*el))+1;
x:=false; 
writeln;
if rpl then
   begin
   rpl:=false;         
   writeln('repelled ',round(rpll/20*str2),' damage');
   hp2:=hp2-round(rpll/20*str2);
   str2:=str2-round((rpll/20)*str2);
   end;
if acr2<66 then
begin
goto 99;
97:
begin
randomize;
def:=random(7+lvl+defl)+1;
def:=round(def*0.1*(10+aaaab));
end;
str2:=str2-def;
if str2<0 then str2:=0;
end;
hp:=hp-str2;
writeln;
writeln('enemy did ',str2,' damage');
writeln('your health = ',hp);
end
else writeln('enemy missed');
writeln;
goto 1;
99:
c:=0;
repeat
inc(c);
until c=5000000;
if x then goto 98;
goto 97;
100:
writeln('<1> for 3 health');
writeln('******************');
writeln('<2> for 3 acuracy');
writeln('******************');
writeln('<3> for 3 strength');
writeln('******************');
writeln('<4> for 3 defence');
writeln('------------------');
writeln('<5> for 1 more ammo of burn magic');
writeln('------------------');       
writeln('<6> for 1 more ammo of freeze magic');
writeln('------------------');
writeln('<7> for 1 more ammo of double hit magic');
writeln('------------------');
writeln('<8> for 1 more ammo of repel magic');
writeln('------------------');                
writeln('<9> for 1 more level of burn magic');
writeln('------------------');  
writeln('<10> for 1 more level of repel magic');
writeln('------------------');
readln(aaa);
if aaa<11 then
begin
if aaa=1 then
begin
hpl:=hpl+3;
end;
if aaa=2 then
begin
acrl:=acrl+3;
end;
if aaa=3 then
begin
strl:=strl+3;
end;         
if aaa=4 then
begin
defl:=defl+3;
end;         
if aaa=5 then
begin
inc(brnq);
end;        
if aaa=6 then
begin
inc(frzq);
end;        
if aaa=7 then
begin
inc(dhq);
end;        
if aaa=8 then
begin
inc(rplq);
end;        
if aaa=9 then
begin
inc(brnl);
end;        
if aaa=10 then
begin
inc(rpll);
end;
end
else goto 100;
clrscr;
brnqd:=brnq;
frzqd:=frzq;
dhqd:=dhq;
rplqd:=rplq;
y:=false;
bnok:=true;
goto 4;
2:END.

one starter game:

program guess;
uses crt;
var a,b,c:integer;
label 1,2;
begin
textbackground(green);
textcolor(white);
clrscr;
1:
c:=0;
writeln('guess a number from 1 to 1000');
randomize;
b:=random(1000)+1;
2:
readln(a);
inc(c);
if a<b then
begin
writeln('too little');
goto 2;
end;
if a>b then
begin 
writeln('too much');
goto 2;
end;
writeln('You found it! It took you ',c,' guesses to get it');
writeln;
goto 1;
end.

one bigger game:

program weee (input,output,save);
uses crt;
type a31415=array [1..10,1..10] of integer;
var save: text; a,b,d,e,str,hp,acr,def,str2,hp2,acr2,def2,qpoints,mlvl,nmonk,brnqd,frzns,frzqd,dhqd,rplqd,place,lvl,el,edl,c,z,emoney,hpl,acrl,strl,across,down,defl,aaa,bbb,ccc,ddd,stash,bombs,healpo: integer; ep,exp,test,neededexp: real; w,x,y,mon,anok,bnok,rpl,dh,boss: boolean; aaaaa,aaaab,aaaac,aaaad,aaaae,aaaaf,frzq,brnq,dhq,rplq,brnl,rpll: integer; a1,a2,a3,junk: char; land: a31415;
label 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,95,96,97,98,99,100,995,996,997,998,999,9999;
BEGIN
assign(save,'C:/x.txt');
lvl:=3;
neededexp:=1.3;
textbackground(green);
textcolor(white);
clrscr;
for a:=1 to 10 do                      {Copyright 2006, Edward Swernofsky}
    begin
    for b:=1 to 10 do
        begin
        c:=0;
        repeat
        inc(c);
        until c=5000000;
        randomize;
        land[a,b]:=(random(2)+1)-1;
        end;
    end;
for a:=1 to 3 do
    begin
    for b:=1 to 3 do
        begin
        land[a,b]:=1;
        end;
    end;
land[1,10]:=2;
land[10,1]:=2;
land[10,10]:=2;
across:=1;
down:=1;
brnl:=1;
rpll:=1;
writeln('your magic progresses as you gain levels');
4:
if y then goto 100;
hp:=100+10*lvl+10*hpl;
hp2:=100+10*el;
if bnok then
begin
bnok:=false;
goto 995;
end;
if mon then
begin
mon:=false;
goto 1;
end;
999:
place:=land[across,down];
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,1],' | ',land[2,1],' | ',land[3,1],' | ',land[4,1],' | ',land[5,1],' | ',land[6,1],' | ',land[7,1],' | ',land[8,1],' | ',land[9,1],' | ',land[10,1],' |');
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,2],' | ',land[2,2],' | ',land[3,2],' | ',land[4,2],' | ',land[5,2],' | ',land[6,2],' | ',land[7,2],' | ',land[8,2],' | ',land[9,2],' | ',land[10,2],' |');
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,3],' | ',land[2,3],' | ',land[3,3],' | ',land[4,3],' | ',land[5,3],' | ',land[6,3],' | ',land[7,3],' | ',land[8,3],' | ',land[9,3],' | ',land[10,3],' |'); 
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                          
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,4],' | ',land[2,4],' | ',land[3,4],' | ',land[4,4],' | ',land[5,4],' | ',land[6,4],' | ',land[7,4],' | ',land[8,4],' | ',land[9,4],' | ',land[10,4],' |');
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,5],' | ',land[2,5],' | ',land[3,5],' | ',land[4,5],' | ',land[5,5],' | ',land[6,5],' | ',land[7,5],' | ',land[8,5],' | ',land[9,5],' | ',land[10,5],' |'); 
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,6],' | ',land[2,6],' | ',land[3,6],' | ',land[4,6],' | ',land[5,6],' | ',land[6,6],' | ',land[7,6],' | ',land[8,6],' | ',land[9,6],' | ',land[10,6],' |');
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,7],' | ',land[2,7],' | ',land[3,7],' | ',land[4,7],' | ',land[5,7],' | ',land[6,7],' | ',land[7,7],' | ',land[8,7],' | ',land[9,7],' | ',land[10,7],' |');
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,8],' | ',land[2,8],' | ',land[3,8],' | ',land[4,8],' | ',land[5,8],' | ',land[6,8],' | ',land[7,8],' | ',land[8,8],' | ',land[9,8],' | ',land[10,8],' |'); 
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,9],' | ',land[2,9],' | ',land[3,9],' | ',land[4,9],' | ',land[5,9],' | ',land[6,9],' | ',land[7,9],' | ',land[8,9],' | ',land[9,9],' | ',land[10,9],' |');        
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,10],' | ',land[2,10],' | ',land[3,10],' | ',land[4,10],' | ',land[5,10],' | ',land[6,10],' | ',land[7,10],' | ',land[8,10],' | ',land[9,10],' | ',land[10,10],' |');
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');
writeln('1 is a city, 2 is a boss, and 0 is a hunting place');
writeln('you are at ',across,',',down);
if place=0 then
   begin
   writeln('type 1 to go hunting, and 2 to save or recover');
   readln(a);
   clrscr;
   if a=1 then goto 997;
   if a=2 then goto 996;
   goto 999;
   end;
if place=1 then
   begin
   writeln('type 1 to go shopping, 2 to move, 3 to save or recover, and 4 to see your stats');
   readln(a);
   clrscr;
   if a=1 then goto 998;
   if a=2 then goto 995;
   if a=3 then goto 996; 
   if a=4 then goto 95;
   goto 999;
   end;
if place=2 then
   begin
   textcolor(yellow);
   writeln('BBB OOO SSS SSS!');
   writeln('BBB OOO SSS SSS!');
   writeln('BBB OOO SSS SSS!');
   textcolor(white);
   el:=lvl*3;
   boss:=true;
   mon:=true;
   goto 4;
   end;      
if place=3 then
   begin
   textcolor(red);
   writeln('MMM EEE GGG AAA BBB OOO SSS SSS!');
   writeln('MMM EEE GGG AAA BBB OOO SSS SSS!');
   writeln('MMM EEE GGG AAA BBB OOO SSS SSS!');
   textcolor(white);
   el:=lvl*10;
   boss:=true;
   mon:=true;
   goto 4;
   end;
998:
   begin
   writeln('you have ',stash,' gp,');
   writeln;
   writeln('type 1 to buy a sword upgrade for 10000 gp,');
   writeln;                                    
   writeln('type 2 to buy a shield upgrade for 10000 gp,');
   writeln;
   writeln('type 3 to buy an eye glass upgrade for 10000 gp,');
   writeln;
   writeln('type 4 to buy a health potion for 5000 gp,');
   readln(a);
   clrscr;
   if a=1 then
      begin
      if stash>10000 then
         begin
         writeln('purchased!');
         inc(aaaaa);
         stash:=stash-10000;
         goto 998;
         end;
      end;
   if a=2 then
      begin
      if stash>10000 then
         begin
         writeln('purchased!');
         inc(aaaab);
         stash:=stash-10000;
         goto 998;
         end;
      end;
   if a=3 then
      begin
      if stash>10000 then
         begin
         writeln('purchased!');
         inc(aaaac);
         stash:=stash-10000;
         goto 998;
         end;
      end;
   if a=4 then
      begin
      if stash>5000 then
         begin
         writeln('purchased!');
         inc(healpo);
         stash:=stash-5000;
         goto 998;
         end;
      end;
   goto 999;
   end;
997:
   begin
   randomize;
   e:=random(100)+1;
   if e>20 then
      begin
      if e>40 then
         begin
         if e>60 then
            begin
            if e>70 then
               begin
                  if e>90 then
                     begin
                     if e>99 then
                        begin
                        textcolor(blue);
                        writeln('YOU LEVELED UP!!!!!!!!!'); 
                        textcolor(white);
                        writeln;
                        goto 96;
                        end;   
                     textcolor(blue);
                     writeln('YOU FOUND A TREASURE CHEST!!!!');
                     textcolor(white);
                     writeln;
                     stash:=stash+1000;
                     goto 999;
                     end;
               textcolor(blue);
               writeln('YOU FOUND A POTION!!!!'); 
               textcolor(white);
               writeln;
               healpo:=healpo+1;
               goto 999;
               end;
            textcolor(yellow);
            writeln('YOU DID NOT FIND ANYTHING!!!!!!!!');  
            textcolor(white);
            writeln;
            goto 999;
            end;
         writeln('YOU WERE ATTACKED!!!!!!!!!!!! -1         !!!!!!!!!');
         writeln;
         el:=lvl-1;
         mon:=true;
         goto 4;
         end;
      writeln('YOU WERE ATTACKED!!!!!!!!!!!! +1         !!!!!!!!!');
      writeln;
      el:=lvl+1;
      mon:=true;
      goto 4;
      end;
   writeln('YOU WERE ATTACKED!!!!!!!!!!!! Same lvl   !!!!!!!!!');
   writeln;
   el:=lvl;
   mon:=true;
   goto 4;
   end;
996:
   begin
   writeln('type 1 to save, 2 to recover and 3 to quit');
   readln(a);
   clrscr;
   if a=1 then
      begin
      rewrite(save);
      writeln(save,lvl,' ',stash,' ',exp,' ',neededexp,' ',acrl,' ',strl,' ',defl,' ',bombs,' ',healpo,' ',hpl,' ',aaaaa,' ',aaaab,' ',aaaac,' ',aaaad,' ',brnq,' ',frzq,' ',dhq,' ',rplq,' ',brnl,' ',rpll,' ',across,' ',down);
      close(save);
      goto 999;
      end;
   if a=2 then
      begin
      reset(save);
      readln(save,lvl,stash,exp,neededexp,acrl,strl,defl,bombs,healpo,hpl,aaaaa,aaaab,aaaac,aaaad,brnq,frzq,dhq,rplq,brnl,rpll,across,down);
      close(save);
      brnqd:=brnq;
      frzqd:=frzq;
      dhqd:=dhq;
      rplqd:=rplq;
      goto 4;
      end;
   if a=3 then goto 999;
   end;
95:
   begin
   writeln;                         
   writeln('your level is ',lvl);

   writeln('you have ',hp,' health');
   writeln('you have ',strl,' strength');
   writeln('you have ',acrl,' acuracy');
   writeln('you have ',defl,' defence');

   writeln('you have ',brnq,' burn spells per battle');
   writeln('you have ',frzq,' freeze spells per battle');
   writeln('you have ',dhq,' double hit spells per battle');
   writeln('you have ',rplq,' repel spells per battle');

   writeln('your burn level is ',brnl);                   
   writeln('your repel level is ',rpll);

   writeln('you have ',stash,' gp');      
   writeln('your sword lvl is ',aaaaa);
   writeln('your shield lvl is ',aaaab);
   writeln('your eyeglass lvl is ',aaaac);
   writeln('you have ',healpo,' health potions');

   writeln('you have ',round(exp),' experience');
   writeln('you need ',round((neededexp-exp)),' more experience to get to the next level');
   writeln;
   readln;
   clrscr;
   goto 999;
   end;
1:
if hp2<1 then
   begin
   if boss then
   begin
   boss:=false;
   writeln('you beat a boss!!!!!!!');
   emoney:=el*100;
   inc(qpoints);
   if (qpoints mod 5)=0 then land[10,10]:=3;
   end
   else emoney:=el*50;
   writeln('you got ',emoney,' gp');
   stash:=stash+emoney;
   ep:=1.1;
   brnqd:=brnq;
   frzqd:=frzq;
   dhqd:=dhq;
   rplqd:=rplq;
   for a:=1 to el do
      begin
      ep:=ep*1.1;
      end;
   exp:=exp+ep;
   writeln('you win!');
   if exp>neededexp then
      begin
96:
      inc(lvl);
      exp:=0;
      writeln;
      writeln('YOU GAINED A LEVEL!!!!!!!');
      writeln;
      neededexp:=neededexp*1.4;
      y:=true;
      end;
   bnok:=true;
   readln;
   clrscr;
   goto 4;
   end;
if hp<1 then
   begin
   brnqd:=brnq;
   frzqd:=frzq;
   dhqd:=dhq;
   rplqd:=rplq;
   textcolor(red);
   writeln('you lose!');
   textcolor(white);
   lvl:=lvl-1;
   exp:=0;
   neededexp:=1.3;
   for a:=1 to (lvl-2) do neededexp:=neededexp*1.3;
   bnok:=true;
   readln;
   goto 4;
   end;
   if anok then
   begin
995: 
anok:=false;
place:=land[across,down];
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,1],' | ',land[2,1],' | ',land[3,1],' | ',land[4,1],' | ',land[5,1],' | ',land[6,1],' | ',land[7,1],' | ',land[8,1],' | ',land[9,1],' | ',land[10,1],' |');
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,2],' | ',land[2,2],' | ',land[3,2],' | ',land[4,2],' | ',land[5,2],' | ',land[6,2],' | ',land[7,2],' | ',land[8,2],' | ',land[9,2],' | ',land[10,2],' |');
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,3],' | ',land[2,3],' | ',land[3,3],' | ',land[4,3],' | ',land[5,3],' | ',land[6,3],' | ',land[7,3],' | ',land[8,3],' | ',land[9,3],' | ',land[10,3],' |'); 
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                          
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,4],' | ',land[2,4],' | ',land[3,4],' | ',land[4,4],' | ',land[5,4],' | ',land[6,4],' | ',land[7,4],' | ',land[8,4],' | ',land[9,4],' | ',land[10,4],' |');
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,5],' | ',land[2,5],' | ',land[3,5],' | ',land[4,5],' | ',land[5,5],' | ',land[6,5],' | ',land[7,5],' | ',land[8,5],' | ',land[9,5],' | ',land[10,5],' |'); 
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,6],' | ',land[2,6],' | ',land[3,6],' | ',land[4,6],' | ',land[5,6],' | ',land[6,6],' | ',land[7,6],' | ',land[8,6],' | ',land[9,6],' | ',land[10,6],' |');
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,7],' | ',land[2,7],' | ',land[3,7],' | ',land[4,7],' | ',land[5,7],' | ',land[6,7],' | ',land[7,7],' | ',land[8,7],' | ',land[9,7],' | ',land[10,7],' |');
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,8],' | ',land[2,8],' | ',land[3,8],' | ',land[4,8],' | ',land[5,8],' | ',land[6,8],' | ',land[7,8],' | ',land[8,8],' | ',land[9,8],' | ',land[10,8],' |'); 
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');                                                                                                                         
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,9],' | ',land[2,9],' | ',land[3,9],' | ',land[4,9],' | ',land[5,9],' | ',land[6,9],' | ',land[7,9],' | ',land[8,9],' | ',land[9,9],' | ',land[10,9],' |');        
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('| ',land[1,10],' | ',land[2,10],' | ',land[3,10],' | ',land[4,10],' | ',land[5,10],' | ',land[6,10],' | ',land[7,10],' | ',land[8,10],' | ',land[9,10],' | ',land[10,10],' |');
writeln('|   |   |   |   |   |   |   |   |   |   |');
writeln('-----------------------------------------');
writeln('1 is a city and 0 is a hunting place');
writeln('you are at ',across,',',down);
   writeln('type 1 to go up, 2 to go down, 3 to go left, 4 to go right, and 5 to stay where you are');
   readln(a);
   if a=1 then
      begin
      if down=1 then
      begin
      clrscr;
      goto 995;
      end;
      down:=down-1;
      clrscr;    
      goto 999;
      end;   
   if a=2 then
      begin      
      if down=10 then
      begin
      clrscr;
      goto 995;
      end;
      down:=down+1;
      clrscr;    
      goto 999;
      end;
   if a=3 then
      begin                    
      if across=1 then
      begin
      clrscr;
      goto 995;
      end;
      across:=across-1;
      clrscr;    
      goto 999;
      end;
   if a=4 then
      begin     
      if across=10 then 
      begin
      clrscr;
      goto 995;
      end;
      across:=across+1;
      clrscr;    
      goto 999;
      end;
      clrscr;
   if a=5 then goto 999;
   goto 995;
   end;
writeln('type 1 to attack');
if healpo>0 then writeln('type 2 to use potion'); 
if brnq>0 then writeln('type 3 to use burn');
if frzq>0 then writeln('type 4 to use freeze');
if dhq>0 then writeln('type 5 to use double hit');
if rplq>0 then writeln('type 6 to use repel');
readln(a);
clrscr;
if a=1 then goto 3;
if a=2 then
   begin
   if healpo>0 then
      begin
      healpo:=healpo-1;
      hp:=hp+2*el+50;
      goto 1;
      end;
   end;
if a=3 then
   begin  
   if brnqd>0 then
   begin
   brnqd:=brnqd-1;
   randomize;
   str:=brnl*10+(random(5)+1)-1;
   goto 9999;
   end;
   end;
if a=4 then
   begin
   if frzqd>0 then
   begin
   frzqd:=frzqd-1;
   inc(frzns);
   end;
   end;
if a=5 then
   begin
   if dhqd>0 then
   begin      
   dhqd:=dhqd-1;
   dh:=true;
   goto 3;
   end;
   end;
if a=6 then
   begin
   if rplqd>0 then
   begin    
   rplqd:=rplqd-1;
   rpl:=true;
   goto 3;
   end;
   end;
goto 1;
3:
writeln('  YOU                       HIM');
writeln('---------------------------------');
writeln('  ***        //      ||     ***  ');
writeln(' *****      //       ||    ***** ');
writeln('  ***      //        ||     ***  ');
writeln('************         ************');
writeln('***********           ***********');
writeln('*******                   *******');
writeln('*******                   *******');
writeln('**   **                   **   **');
writeln('**   **                   **   **');
writeln('**   **                   **   **');
writeln('---------------------------------');
z:=1;
goto 5;
6:
writeln('   YOU                      HIM');
writeln('---------------------------------');
writeln('   ***        //     ||     ***  ');
writeln('  *****      //      ||    ***** ');
writeln('   ***      //       ||     ***  ');
writeln(' ************        ************');
writeln(' ***********          ***********');
writeln(' *******                  *******');
writeln(' *******                  *******');
writeln(' **   **                  **   **');
writeln(' **   **                  **   **');
writeln(' **   **                  **   **');
writeln('---------------------------------');
inc(z);
goto 5;
7:
writeln('    YOU                     HIM');
writeln('---------------------------------');
writeln('    ***        //    ||     ***  ');
writeln('   *****      //     ||    ***** ');
writeln('    ***      //      ||     ***  ');
writeln('  ************       ************');
writeln('  ***********         ***********');
writeln('  *******                 *******');
writeln('  *******                 *******');
writeln('  **   **                 **   **');
writeln('  **   **                 **   **');
writeln('  **   **                 **   **');
writeln('---------------------------------');
inc(z);
goto 5;
8:
writeln('      YOU                   HIM');
writeln('---------------------------------');
writeln('      ***        //  ||     ***  ');
writeln('     *****      //   ||    ***** ');
writeln('      ***      //    ||     ***  ');
writeln('    ************     ************');
writeln('    ***********       ***********');
writeln('    *******               *******');
writeln('    *******               *******');
writeln('    **   **               **   **');
writeln('    **   **               **   **');
writeln('    **   **               **   **');
writeln('---------------------------------');
inc(z);
goto 5;
9:
writeln('       YOU                  HIM');
writeln('---------------------------------');
writeln('       ***        // ||     ***  ');
writeln('      *****      //  ||    ***** ');
writeln('       ***      //   ||     ***  ');
writeln('     ************    ************');
writeln('     ***********      ***********');
writeln('     *******              *******');
writeln('     *******              *******');
writeln('     **   **              **   **');
writeln('     **   **              **   **');
writeln('     **   **              **   **');
writeln('---------------------------------');
inc(z);
goto 5;
10:
writeln('        YOU                 HIM');
writeln('---------------------------------');
writeln('        ***        //||     ***  ');
writeln('       *****      // ||    ***** ');
writeln('        ***      //  ||     ***  ');
writeln('      ************   ************');
writeln('      ***********     ***********');
writeln('      *******             *******');
writeln('      *******             *******');
writeln('      **   **             **   **');
writeln('      **   **             **   **');
writeln('      **   **             **   **');
writeln('---------------------------------');
inc(z);
goto 5;
11:
writeln('         YOU                HIM');
writeln('---------------------------------');
writeln('         ***        //|     ***  ');
writeln('        *****      //||    ***** ');
writeln('         ***      // ||     ***  ');
writeln('       ************  ************');
writeln('       ***********    ***********');
writeln('       *******            *******');
writeln('       *******            *******');
writeln('       **   **            **   **');
writeln('       **   **            **   **');
writeln('       **   **            **   **');
writeln('---------------------------------');
inc(z);
goto 5;
12:
writeln('          YOU               HIM');
writeln('---------------------------------');
writeln('          ***        //     ***  ');
writeln('         *****      //|    ***** ');
writeln('          ***      //||     ***  ');
writeln('        ************ ************');
writeln('        ***********   ***********');
writeln('        *******           *******');
writeln('        *******           *******');
writeln('        **   **           **   **');
writeln('        **   **           **   **');
writeln('        **   **           **   **');
writeln('---------------------------------');
inc(z);
goto 5;
13:
writeln('          YOU               HIM');
writeln('---------------------------------');
writeln('          ***            || ***  ');
writeln('         *****           ||***** ');
writeln('          ***            || ***  ');
writeln('        ***********----------****');
writeln('        ************---------****');
writeln('        *******           *******');
writeln('        *******           *******');
writeln('        **   **           **   **');
writeln('        **   **           **   **');
writeln('        **   **           **   **');
writeln('---------------------------------');
inc(z);
goto 5;
14:
writeln('          YOU               HIM');
writeln('---------------------------------');
writeln('          ***         ||    ***  ');
writeln('         *****        ||   ***** ');
writeln('          ***         ||    ***  ');
writeln('        ************\ ***********');
writeln('        *********** \\ **********');
writeln('        *******      \\   *******');
writeln('        *******       \\  *******');
writeln('        **   **        \\ **   **');
writeln('        **   **           **   **');
writeln('        **   **           **   **');
writeln('---------------------------------');
inc(z);
goto 5;
15:
writeln('        YOU                 HIM');
writeln('---------------------------------');
writeln('        ***          ||     ***  ');
writeln('       *****         ||    ***** ');
writeln('        ***          ||     ***  ');
writeln('      ************\  ************');
writeln('      ************\\  ***********');
writeln('      *******      \\     *******');
writeln('      *******       \\    *******');
writeln('      **   **        \\   **   **');
writeln('      **   **             **   **');
writeln('      **   **             **   **');
writeln('---------------------------------');
inc(z);
goto 5;
16:
writeln('      YOU                   HIM');
writeln('---------------------------------');
writeln('      ***            ||     ***  ');
writeln('     *****           ||    ***** ');
writeln('      ***            ||     ***  ');
writeln('    ************\    ************');
writeln('    *********** \\    ***********');
writeln('    *******      \\       *******');
writeln('    *******       \\      *******');
writeln('    **   **        \\     **   **');
writeln('    **   **               **   **');
writeln('    **   **               **   **');
writeln('---------------------------------');
inc(z);
goto 5;
17:
writeln('     YOU                    HIM');
writeln('---------------------------------');
writeln('     ***             ||     ***  ');
writeln('    *****            ||    ***** ');
writeln('     ***             ||     ***  ');
writeln('   ***********_______************');
writeln('   ************______ ***********');
writeln('   *******                *******');
writeln('   *******                *******');
writeln('   **   **                **   **');
writeln('   **   **                **   **');
writeln('   **   **                **   **');
writeln('---------------------------------');
inc(z);
goto 5;
18:
writeln('   YOU                      HIM');
writeln('---------------------------------');
writeln('   ***         //    ||     ***  ');
writeln('  *****       //     ||    ***** ');
writeln('   ***       //      ||     ***  ');
writeln(' *************       ************');
writeln(' ************         ***********');
writeln(' *******                  *******');
writeln(' *******                  *******');
writeln(' **   **                  **   **');
writeln(' **   **                  **   **');
writeln(' **   **                  **   **');
writeln('---------------------------------');
inc(z);
goto 5;
19:
writeln('  YOU                       HIM');
writeln('---------------------------------');
writeln('  ***     ||         ||     ***  ');
writeln(' *****    ||         ||    ***** ');
writeln('  ***     ||         ||     ***  ');
writeln('************         ************');
writeln('***********           ***********');
writeln('*******                   *******');
writeln('*******                   *******');
writeln('**   **                   **   **');
writeln('**   **                   **   **');
writeln('**   **                   **   **');
writeln('---------------------------------');
inc(z);
goto 5;        
20:
writeln('  YOU                      HIM');
writeln('---------------------------------');
writeln('  ***     ||        ||     ***  ');
writeln(' *****    ||        ||    ***** ');
writeln('  ***     ||        ||     ***  ');
writeln('************        ************');
writeln('***********          ***********');
writeln('*******                  *******');
writeln('*******                  *******');
writeln('**   **                  **   **');
writeln('**   **                  **   **');
writeln('**   **                  **   **');
writeln('---------------------------------');
inc(z);
goto 5;
21:
writeln('  YOU                     HIM');
writeln('---------------------------------');
writeln('  ***     ||    \\        ***  ');
writeln(' *****    ||     \\      ***** ');
writeln('  ***     ||      \\      ***  ');
writeln('************       ************');
writeln('***********         ***********');
writeln('*******                 *******');
writeln('*******                 *******');
writeln('**   **                 **   **');
writeln('**   **                 **   **');
writeln('**   **                 **   **');
writeln('---------------------------------');
inc(z);
goto 5;
22:
writeln('  YOU                    HIM');
writeln('---------------------------------');
writeln('  ***     ||   \\        ***  ');
writeln(' *****    ||    \\      ***** ');
writeln('  ***     ||     \\      ***  ');
writeln('************      ************');
writeln('***********        ***********');
writeln('*******                *******');
writeln('*******                *******');
writeln('**   **                **   **');
writeln('**   **                **   **');
writeln('**   **                **   **');
writeln('---------------------------------');
inc(z);
goto 5;
23:
writeln('  YOU                   HIM');
writeln('---------------------------------');
writeln('  ***     ||  \\        ***  ');
writeln(' *****    ||   \\      ***** ');
writeln('  ***     ||    \\      ***  ');
writeln('************     ************');
writeln('***********       ***********');
writeln('*******               *******');
writeln('*******               *******');
writeln('**   **               **   **');
writeln('**   **               **   **');
writeln('**   **               **   **');
writeln('---------------------------------');
inc(z);
goto 5;
24:
writeln('  YOU                  HIM');
writeln('---------------------------------');
writeln('  ***     || \\        ***  ');
writeln(' *****    ||  \\      ***** ');
writeln('  ***     ||   \\      ***  ');
writeln('************    ************');
writeln('***********      ***********');
writeln('*******              *******');
writeln('*******              *******');
writeln('**   **              **   **');
writeln('**   **              **   **');
writeln('**   **              **   **');
writeln('---------------------------------');
inc(z);
goto 5;
25:
writeln('  YOU                 HIM');
writeln('---------------------------------');
writeln('  ***     ||\\        ***  ');
writeln(' *****    || \\      ***** ');
writeln('  ***     ||  \\      ***  ');
writeln('************   ************');
writeln('***********     ***********');
writeln('*******             *******');
writeln('*******             *******');
writeln('**   **             **   **');
writeln('**   **             **   **');
writeln('**   **             **   **');
writeln('---------------------------------');
inc(z);
goto 5;
26:
writeln('  YOU              HIM');
writeln('---------------------------------');
writeln('  ***     |\\        ***  ');
writeln(' *****    ||\\      ***** ');
writeln('  ***     || \\      ***  ');
writeln('************  ************');
writeln('***********    ***********');
writeln('*******            *******');
writeln('*******            *******');
writeln('**   **            **   **');
writeln('**   **            **   **');
writeln('**   **            **   **');
writeln('---------------------------------');
inc(z);
goto 5;
27:
writeln('  YOU               HIM');
writeln('---------------------------------');
writeln('  ***     \\        ***  ');
writeln(' *****    |\\      ***** ');
writeln('  ***     ||\\      ***  ');
writeln('************ ************');
writeln('***********   ***********');
writeln('*******           *******');
writeln('*******           *******');
writeln('**   **           **   **');
writeln('**   **           **   **');
writeln('**   **           **   **');
writeln('---------------------------------');
inc(z);
goto 5;
28:
writeln('  YOU               HIM');
writeln('---------------------------------');
writeln('  ***     ||        ***  ');
writeln(' *****    ||       ***** ');
writeln('  ***     ||        ***  ');
writeln('****----------***********');
writeln('****---------************');
writeln('*******           *******');
writeln('*******           *******');
writeln('**   **           **   **');
writeln('**   **           **   **');
writeln('**   **           **   **');
writeln('---------------------------------');
inc(z);
goto 5;
29:
writeln('  YOU               HIM');
writeln('---------------------------------');
writeln('  ***    ||         ***  ');
writeln(' *****   ||        ***** ');
writeln('  ***    ||         ***  ');
writeln('*********** /************');
writeln('********** // ***********');
writeln('*******   //      *******');
writeln('*******  //       *******');
writeln('**   ** //        **   **');
writeln('**   **           **   **');
writeln('**   **           **   **');
writeln('---------------------------------');
inc(z);
goto 5;   
30:
writeln('  YOU                HIM');
writeln('---------------------------------');
writeln('  ***    ||          ***  ');
writeln(' *****   ||         ***** ');
writeln('  ***    ||          ***  ');
writeln('***********  /************');
writeln('**********  // ***********');
writeln('*******    //      *******');
writeln('*******   //       *******');
writeln('**   **  //        **   **');
writeln('**   **            **   **');
writeln('**   **            **   **');
writeln('---------------------------------');
inc(z);
goto 5;
31:
writeln('  YOU                 HIM');
writeln('---------------------------------');
writeln('  ***    ||           ***  ');
writeln(' *****   ||          ***** ');
writeln('  ***    ||           ***  ');
writeln('***********   /************');
writeln('**********   // ***********');
writeln('*******     //      *******');
writeln('*******    //       *******');
writeln('**   **   //        **   **');
writeln('**   **             **   **');
writeln('**   **             **   **');
writeln('---------------------------------');
inc(z);
goto 5;
32:
writeln('  YOU                   HIM');
writeln('---------------------------------');
writeln('  ***    ||             ***  ');
writeln(' *****   ||            ***** ');
writeln('  ***    ||             ***  ');
writeln('***********     /************');
writeln('**********     // ***********');
writeln('*******       //      *******');
writeln('*******      //       *******');
writeln('**   **     //        **   **');
writeln('**   **               **   **');
writeln('**   **               **   **');
writeln('---------------------------------');
inc(z);
goto 5;
33:
writeln('  YOU                    HIM');
writeln('---------------------------------');
writeln('  ***     ||             ***  ');
writeln(' *****    ||            ***** ');
writeln('  ***     ||             ***  ');
writeln('************_______***********');
writeln('*********** ______************');
writeln('*******                *******');
writeln('*******                *******');
writeln('**   **                **   **');
writeln('**   **                **   **');
writeln('**   **                **   **');
writeln('---------------------------------');
inc(z);
goto 5;
34:
writeln('  YOU                     HIM');
writeln('---------------------------------');
writeln('  ***     ||    \\        ***  ');
writeln(' *****    ||     \\      ***** ');
writeln('  ***     ||      \\      ***  ');
writeln('************       ************');
writeln('***********         ***********');
writeln('*******                 *******');
writeln('*******                 *******');
writeln('**   **                 **   **');
writeln('**   **                 **   **');
writeln('**   **                 **   **');
writeln('---------------------------------');
inc(z);
goto 5;
35:
writeln('  YOU                      HIM');
writeln('---------------------------------');
writeln('  ***     ||        ||     ***  ');
writeln(' *****    ||        ||    ***** ');
writeln('  ***     ||        ||     ***  ');
writeln('************        ************');
writeln('***********          ***********');
writeln('*******                  *******');
writeln('*******                  *******');
writeln('**   **                  **   **');
writeln('**   **                  **   **');
writeln('**   **                  **   **');
writeln('---------------------------------');
inc(z);       
goto 5;
36:
writeln('  YOU                       HIM');
writeln('---------------------------------');
writeln('  ***     ||         ||     ***  ');
writeln(' *****    ||         ||    ***** ');
writeln('  ***     ||         ||     ***  ');
writeln('************         ************');
writeln('***********           ***********');
writeln('*******                   *******');
writeln('*******                   *******');
writeln('**   **                   **   **');
writeln('**   **                   **   **');
writeln('**   **                   **   **');
writeln('---------------------------------');
inc(z);
5:
c:=0;
repeat
inc(c);
until c=1000000;
clrscr;
if z=1 then goto 6;
if z=2 then goto 7;
if z=3 then goto 8;
if z=4 then goto 9;
if z=5 then goto 10;
if z=6 then goto 11;
if z=7 then goto 12;
if z=8 then goto 13;
if z=9 then goto 14;
if z=10 then goto 15;
if z=11 then goto 16;
if z=12 then goto 17;
if z=13 then goto 18;
if z=14 then goto 19;
if z=15 then goto 21;
if z=16 then goto 22;
if z=17 then goto 23;
if z=18 then goto 25;
if z=19 then goto 26;
if z=20 then goto 27;
if z=21 then goto 28;
if z=22 then goto 29;
if z=23 then goto 30;
if z=24 then goto 31;
if z=25 then goto 32;
if z=26 then goto 33;
if z=27 then goto 34;
if z=28 then goto 35;
if z=29 then goto 36;
randomize;
acr:=random(100+lvl+acrl)+1;
acr:=round(acr*0.1*(10+aaaac));
if acr>33 then
   begin
   c:=0;
   repeat
   inc(c);
   until c=5000000;
   randomize;
   str:=random(10+lvl+strl)+1;
   str:=round(str*0.1*(10+aaaaa));
   if dh then
      begin
      dh:=false;
      str:=str*2;
      end;
   x:=true;
   if acr<66 then
      begin
      goto 99;
      98:    
      c:=0;
      repeat
      inc(c);
      until c=5000000;
      randomize;
      def2:=random(7+2*el)+1;
      str:=str-def2;
      if str<0 then str:=0;
      end;
   9999:
   hp2:=hp2-str;
   writeln('you did ',str,' damage');
   writeln('enemy health = ',hp2);
   end
else writeln('you missed');
writeln;
c:=0;
repeat
inc(c);
until c=5000000;
if frzns>0 then
begin
frzns:=frzns-1;
goto 1;
end;
37:
randomize;
acr2:=random(100+round(2*el))+1;
if acr2>33 then
begin
randomize;
str2:=random(10+round(2*el))+1;
x:=false; 
writeln;
if rpl then
   begin
   rpl:=false;         
   writeln('repelled ',round(rpll/20*str2),' damage');
   hp2:=hp2-round(rpll/20*str2);
   str2:=str2-round((rpll/20)*str2);
   end;
if acr2<66 then
begin
goto 99;
97:
begin
randomize;
def:=random(7+lvl+defl)+1;
def:=round(def*0.1*(10+aaaab));
end;
str2:=str2-def;
if str2<0 then str2:=0;
end;
hp:=hp-str2;
writeln;
writeln('enemy did ',str2,' damage');
writeln('your health = ',hp);
end
else writeln('enemy missed');
writeln;
goto 1;
99:
c:=0;
repeat
inc(c);
until c=5000000;
if x then goto 98;
goto 97;
100:
writeln('<1> for 3 health');
writeln('******************');
writeln('<2> for 3 acuracy');
writeln('******************');
writeln('<3> for 3 strength');
writeln('******************');
writeln('<4> for 3 defence');
writeln('------------------');
writeln('<5> for 1 more ammo of burn magic');
writeln('------------------');       
writeln('<6> for 1 more ammo of freeze magic');
writeln('------------------');
writeln('<7> for 1 more ammo of double hit magic');
writeln('------------------');
writeln('<8> for 1 more ammo of repel magic');
writeln('------------------');                
writeln('<9> for 1 more level of burn magic');
writeln('------------------');  
writeln('<10> for 1 more level of repel magic');
writeln('------------------');
readln(aaa);
if aaa<11 then
begin
if aaa=1 then
begin
hpl:=hpl+3;
end;
if aaa=2 then
begin
acrl:=acrl+3;
end;
if aaa=3 then
begin
strl:=strl+3;
end;         
if aaa=4 then
begin
defl:=defl+3;
end;         
if aaa=5 then
begin
inc(brnq);
end;        
if aaa=6 then
begin
inc(frzq);
end;        
if aaa=7 then
begin
inc(dhq);
end;        
if aaa=8 then
begin
inc(rplq);
end;        
if aaa=9 then
begin
inc(brnl);
end;        
if aaa=10 then
begin
inc(rpll);
end;
end
else goto 100;
clrscr;
brnqd:=brnq;
frzqd:=frzq;
dhqd:=dhq;
rplqd:=rplq;
y:=false;
bnok:=true;
goto 4;
2:END.

Hi I'm an amateur programmer (very amateur), and I was wondering what you thought of a program I made. The link is here , if you like it or don't please say and if you can, say what would be better for it like; what colours to use, to make it difficult or hard...etc.

Thanks,

JJarvis

This is the code;

unit Unit1; 

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, Buttons,
  StdCtrls;

type

  { TForm1 }

  TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    Edit1: TEdit;
    Edit2: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end; 

var
  Form1: TForm1;
  x: integer;
  guessnumber: integer;
  myrandomnumber: integer;

implementation

{ TForm1 }

procedure TForm1.Button1Click(Sender: TObject);
begin

randomize;
myrandomnumber:= integer(random(20)+1);
label1.caption:= inttostr (myrandomnumber);
edit1.text:= inttostr(5);
guessnumber:= 5;
edit2.text:= ' ';
label1.visible:= false;

end;

procedure TForm1.Button2Click(Sender: TObject);
begin

label1.caption:= inttostr(myrandomnumber);
if
label1.visible= true
then
label1.visible:= false
else
label1.visible:= true;

end;

procedure TForm1.Button3Click(Sender: TObject);
begin

guessnumber:= guessnumber -1;
edit1.text:= inttostr (guessnumber);
if
guessnumber= 0 then
form1.close
else
if
(strtoint(edit2.text)= myrandomnumber)
then
label2.caption:=  'Well Done'
else
if
(strtoint(edit2.text)< myrandomnumber)
then
label2.caption:= 'Number Too Low'
else
label2.caption:='Number Too High'


end;

initialization
  {$I unit1.lrs}

end.
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.