DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

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

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦affc601d4⟧ Ada Source

    Length: 5120 (0x1400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Trajectoire, seg_059a1a

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« 
        └─⟦this⟧ 

E3 Source Code



with Asteroide;

with Definitions;
with Text_Io;

package body Trajectoire is
    procedure Suivre_Cap (Coord : in out Definitions.Position;
                          Direction : in out Definitions.Cap) is
        -- a voir : les conditions limites, bord du tableau
    begin
        Text_Io.Put_Line ("cap : " & Definitions.Cap'Image (Direction) &
                          " coord " & Integer'Image (Coord.Colonne) &
                          " " & Integer'Image (Coord.Ligne));
        case Direction is


            when Definitions.Nord =>
                if Coord.Ligne > 1 then
                    Coord.Ligne := Coord.Ligne - 1;

                else
                    Asteroide.Initialise (Coord, Direction);
                end if;
            when Definitions.Sud =>
                if Coord.Ligne < 23 then
                    Coord.Ligne := Coord.Ligne + 1;
                else
                    Asteroide.Initialise (Coord, Direction);

                end if;
            when Definitions.Est =>
                if Coord.Colonne < 80 then
                    Coord.Colonne := Coord.Colonne + 1;
                else
                    Asteroide.Initialise (Coord, Direction);

                end if;
            when Definitions.Ouest =>
                if Coord.Colonne > 1 then
                    Coord.Colonne := Coord.Colonne - 1;
                else
                    Asteroide.Initialise (Coord, Direction);

                end if;
            when Definitions.Nord_Est =>
                if Coord.Ligne > 1 and Coord.Colonne < 80 then
                    Coord.Colonne := Coord.Colonne + 1;  
                    Coord.Ligne := Coord.Ligne - 1;
                else
                    Asteroide.Initialise (Coord, Direction);

                end if;

            when Definitions.Nord_Ouest =>
                if Coord.Ligne > 1 and Coord.Colonne > 1 then
                    Coord.Colonne := Coord.Colonne - 1;
                    Coord.Ligne := Coord.Ligne - 1;
                else
                    Asteroide.Initialise (Coord, Direction);

                end if;
            when Definitions.Sud_Est =>
                if Coord.Colonne < 80 and Coord.Ligne < 23 then
                    Coord.Ligne := Coord.Ligne + 1;
                else
                    Asteroide.Initialise (Coord, Direction);


                end if;
            when Definitions.Sud_Ouest =>
                if Coord.Colonne > 1 and Coord.Ligne < 23 then

                    Coord.Ligne := Coord.Ligne + 1;
                    Coord.Colonne := Coord.Colonne - 1;
                else
                    Asteroide.Initialise (Coord, Direction);

                end if;
        end case;

    end Suivre_Cap;
end Trajectoire;

E3 Meta Data

    nblk1=4
    nid=0
    hdr6=8
        [0x00] rec0=1e rec1=00 rec2=01 rec3=000
        [0x01] rec0=01 rec1=00 rec2=03 rec3=02e
        [0x02] rec0=1a rec1=00 rec2=04 rec3=06e
        [0x03] rec0=1b rec1=00 rec2=02 rec3=000
    tail 0x21768a294890f8488b51b 0x42a00088462060003