#include <condefs.h>
#pragma hdrstop
#include "polymorfi.h"
#include <conio.h>

//---------------------------------------------------------------------------
#pragma argsused

struct ListPtr {
  Figur   *Figur;
  ListPtr *Next;
};

int main(int argc, char **argv)
{
  ListPtr  *Head, *Work;
  Head = new ListPtr;
  Head->Next = 0;
  Head->Figur = new Trekant( 1, 1, 23, 24, 25 );
  Work = Head;
  Head = new ListPtr;
  Head->Next = Work;
  Head->Figur = new Cirkel( 2, 2, 17 );
  Work = Head;
  Head = new ListPtr;
  Head->Next = Work;
  Head->Figur = new Kvadrat( 3, 3, 100 );
  Work = Head;
  Head = new ListPtr;
  Head->Next = Work;
  Head->Figur = new Cirkel( 3, 10, 25 );
  if ( Head != 0 )
  {
    Work = Head;
    do {
      Work->Figur->Draw();
      Work = Work->Next;
    } while ( Work != 0 );
  }
getch();
return 0;
}
 