All pastes #534204 Raw Edit

tictactoe

public text v1 · immutable
·published 2007-06-03 18:25 UTC
rendered paste body
   --  Field
   type Person_Set is
         (Nobody,
          Player1,
          Player2);

   type Weighting is
         ('+', '-', '=');

   type Cell is
      record
         Set    : Person_Set := Nobody;
         Weight : Weighting;
      end record;

   type Field is array (Positive range 1 .. 3, Positive range 1 .. 3) of Cell;


   --  Tree
   type ListCell;

   --  Listenzeiger
   type ListCellRef is access ListCell;

   --  Knoten
   type TreeNode is
      record
         Data     : Field;
         Children : ListCellRef;
      end record;

   --  Knotenzeiger
   type Tree is access TreeNode;

   --  Liste der Kinder
   type ListCell is
      record
         Child  : Tree;
         Next   : ListCellRef;
         Weight : Weighting;
      end record;