|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 3072 (0xc00) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Square, seg_058d07
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
package body Square is procedure Get_Dimension (Dim : out Dim_Max) is begin Text_Io.Put ("Entrez la taille du carre magique : "); Io.Get (Dim); end Get_Dimension; procedure Go_Centre is begin Pos_Courante := (Taille mod 2, Taille mod 2); end Go_Centre; procedure Move (D : Direction) is begin case D is when Nord => if Pos_Courante.Y = 0 then Pos_Courante.Y := Taille - 1; else Pos_Courante.Y := Pos_Courante.Y - 1; end if; when Sud => if Pos_Courante.Y = Taille - 1 then Pos_Courante.Y := 0; else Pos_Courante.Y := Pos_Courante.Y - 1; end if; when Est => if Pos_Courante.X = 0 then Pos_Courante.X := Taille - 1; else Pos_Courante.X := Pos_Courante.X - 1; end if; when Ouest => if Pos_Courante.X = Taille - 1 then Pos_Courante.X := 0; else Pos_Courante.X := Pos_Courante.X + 1; end if; when Nord_Est => Move (Nord); Move (Est); when Nord_Ouest => Move (Nord); Move (Ouest); when Sud_Est => Move (Sud); Move (Est); when Sud_Ouest => Move (Sud); Move (Ouest); end case; end Move; procedure Depose (T : Token; Square : in out Board) is begin Square (Pos_Courante.X, Pos_Courante.Y) := T; end Depose; end Square;
nblk1=2 nid=0 hdr6=4 [0x00] rec0=22 rec1=00 rec2=01 rec3=026 [0x01] rec0=1e rec1=00 rec2=02 rec3=001 tail 0x2176630f088ca814eb613 0x42a00088462060003