DataMuseum.dk

Presents historical artifacts from the history of:

RC4000/8000/9000

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RC4000/8000/9000

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦616910bb6⟧ TextFile

    Length: 2304 (0x900)
    Types: TextFile
    Names: »ss«

Derivation

└─⟦00964e8f7⟧ Bits:30007478 RC8000 Dump tape fra HCØ.
    └─⟦b2ec5d50f⟧ 
        └─⟦this⟧ »ss« 

TextFile

begin
comment  program initval.
         Programmet initialiserer tabellerne totval og envval.
         Den interne spillers navn og vægtblok indlæses;
 integer array  totval(0:881),
env(176:3351),
stone(-6:6),
weight(-4:4),
free(1:2,-1:1),
envval(-2:3280);
real array  playername(1:3);
integer  dir,fieldd,f,fiveroffset,player,stones,i,
limit,j,k,l,m,n,q,fval,threat;
boolean field  ij,pq,rs,w;
disk(env,351,6702,<:env:>,0,0);
comment  indlæs spillernavn;
readstring(in,playername,1);
comment  indlæs vægtblokken;
for ij:= -1 step -1 until -5 do
begin
read(in,j);
envval.ij:= false add i;
weight(ij+1):= weight(-ij-1):= i
end;
stone(0):= 1;
stone(-6):= stone(-5):= stone(5):= stone(6):= 0;
for w:= 0 step 1 until 6560 do
begin
i:= w;
comment  find hvilke sten, w består af;
for l:= 1 step 1 until 8 do
begin
j:= case l of (2187,729,243,81,27,9,3,1);
k:= case l of (-4,4,-3,3,-2,2,-1,1);
stone(k):= i//j;
i:= i-j*stone(k)
end l;
comment  find for hver spiller nærmeste modstander-sten
         på hver side af midten;
for player:= 1,2 do
for limit:= -1,1 do
begin
for q:= 0,q+1 while q<5 and stone(limit*q) <> 3-player do ;
free(player,limit):= limit*q
end player,limit;
fval:= threat:= 0;
for fiveroffset:= free(1,-1)+1 step 1 until free(1,1)-5 do
if stone(fiveroffset-1)<>1 and stone(fiveroffset+5)<>1 then
begin
f:= fiveroffset;
stones:= 0;
for fieldd:= f step 1 until f+4 do
if stone(fieldd) = 1 then
begin
stones:= stones+1;
fval:= fval+weight(fieldd)
end;
case stones of
begin
comment 1; ;
comment 2; ;
begin
comment 3;
if threat < 1
and (-,(stone(f-2)=1 and stone(f-1)=0))
and (-,(stone(f+5)=0 and stone(f+6)=1))
and (-,(stone(f-1)=2 and stone(f+5)=2))
and (-,(stone(f)=1 and stone(f+4)=1))
and (-,(stone(f-1)=2 and stone(f)=1))
and (-,(stone(f+5)=2 and stone(f+4)=1))  then  threat:=1
end 3;
begin
comment 4;
▶EOF◀