Einzelnen Beitrag anzeigen

Waldteufel
(Gast)

n/a Beiträge
 
#6

Re: - hilfe - listen generisches array

  Alt 20. Apr 2005, 15:34
Hi.

Zitat von loki:
Delphi-Quellcode:
package Puzzle is
  
    type Orientation_Type is ( North, East, South, West ); -- 0, 90, 180, 270
    type Match_Neighbour_Type is ( Yes, No, Not_Applicable );
  
    type Element_Type is
    record
       Orientation : Orientation_Type;
       Arrow_Direction : Oreintation_Type;
       Match_Left_Neighbour : Match_Neighbour_Type;
       Match_Right_Neighbour : Match_Neighbour_Type;
       Match_Upper_Neighbour : Match_Neighbour_Type;
       Match_Lower_Neighbour : Match_Neighbour_Type;
    end record;
  
    type Board_Type is array ( 1..3, 1..3 ) of Element_Type;
   
 end Puzzle;
Ein Feld kann mehrere Pfeile haben und die 4 Match_..._Neighbour kann man zusammenfassen, also

Delphi-Quellcode:
Arrow_Directions : array (1..4) of Orientation_Type;
Match_Neighbour : array (1..4) of Match_Neighbour_Type;
  Mit Zitat antworten Zitat