DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ B T

⟦7d1decd47⟧ TextFile

    Length: 2264 (0x8d8)
    Types: TextFile
    Names: »B«

Derivation

└─⟦149519bd4⟧ Bits:30000546 8mm tape, Rational 1000, !projects 93-07-13
    └─ ⟦124ff5788⟧ »DATA« 
        └─⟦this⟧ 
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
    └─ ⟦6f12a12be⟧ »DATA« 
        └─⟦this⟧ 
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦this⟧ 
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦e24fb53b7⟧ 
            └─⟦this⟧ 

TextFile

with Window_Io;
package body Towers_Of_Hanoi_Graphic is  
    package Wio renames Window_Io;
    The_Tower_Base : constant := 19;
    The_Image      : Wio.File_Type;

    function Get_Needle_Column (For_Needle : Needle) return Wio.Column_Number is
    begin
        case For_Needle is
            when 1 =>
                return 14;
            when 2 =>
                return 40;
            when 3 =>
                return 65;
        end case;
    end Get_Needle_Column;

    procedure Print_Needle (Which : Needle; Height : Natural) is
        Column : constant Wio.Column_Number := Get_Needle_Column (Which);
    begin
        for I in 1 .. Height loop
            Wio.Position_Cursor (The_Image, The_Tower_Base - I, Column);
            Wio.Overwrite (The_Image, "|");
        end loop;
    end Print_Needle;


    procedure Print_Disk_With_Char (For_Needle : Needle;
                                    The_Disk   : Positive;
                                    Its_Size   : Positive;
                                    The_Char   : Character) is

        Column : constant Wio.Column_Number := Get_Needle_Column (For_Needle);
        Line : constant Wio.Line_Number := The_Tower_Base - The_Disk;
        The_String : constant String := String'(1 .. 1 => The_Char);
    begin
        for I in 1 .. Its_Size loop
            Wio.Position_Cursor (The_Image, Line, Column - I);
            Wio.Overwrite (The_Image, The_String);
        end loop;
        for I in 1 .. Its_Size loop
            Wio.Position_Cursor (The_Image, Line, Column + I);
            Wio.Overwrite (The_Image, The_String);
        end loop;
    end Print_Disk_With_Char;


    procedure Print_Disk (For_Needle : Needle;
                          The_Disk   : Positive;
                          Its_Size   : Positive) is  
    begin
        Print_Disk_With_Char (For_Needle, The_Disk, Its_Size, '=');
    end Print_Disk;

    procedure Delete_Disk (For_Needle : Needle;
                           The_Disk   : Positive;
                           Its_Size   : Positive) is  
    begin
        Print_Disk_With_Char (For_Needle, The_Disk, Its_Size, ' ');

    end Delete_Disk;
begin
    Wio.Create (The_Image, Wio.Out_File, "Testing the towers of Hanoi");
end Towers_Of_Hanoi_Graphic;