// InklusionsPolymorfi.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream>
#include <conio.h>
#include "../../Include/Polymorfi.h"
using namespace std;

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;
}

