//---------------------------------------------------------------------------

#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <Graphics.hpp>
#include <Windows.h>
//---------------------------------------------------------------------------
class Fil
{
   public:
      TImage *pusty;
      TImage *lewa;
      TImage *je;
};

struct DANE
{
   int nr;
   int *czas;
   bool *ChceJesc;
   Fil *f;
   TImage *lewa;
   TImage *prawa;
};

class TForm1 : public TForm
{
__published:	// IDE-managed Components
   TImage *Stol;
   TImage *Pal2;
   TImage *Pal4;
   TImage *Pal1;
   TImage *Pal3;
   TImage *Pal5;
   TImage *F1je;
   TImage *F1lewa;
   TImage *F2je;
   TImage *F2lewa;
   TImage *F4lewa;
   TImage *F4je;
   TImage *F5je;
   TImage *F3lewa;
   TImage *F3je;
   TImage *F5lewa;
   TImage *F5bez;
   TImage *F4bez;
   TImage *F2bez;
   TImage *F1bez;
   TImage *F3bez;
   TButton *Button1;
   void __fastcall F1bezClick(TObject *Sender);
   void __fastcall F2bezClick(TObject *Sender);
   void __fastcall F3bezClick(TObject *Sender);
   void __fastcall F4bezClick(TObject *Sender);
   void __fastcall F5bezClick(TObject *Sender);
   void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
   void __fastcall Button1Click(TObject *Sender);
private:	// User declarations
   bool ChceJesc[5];
   int czas[5];
   Fil F[5];
   DWORD nr1,nr2,nr3,nr4,nr5;
   HANDLE PALECZKA[5];
   HANDLE FILOZOF[5];
   DWORD TID1,TID2,TID3,TID4,TID5;
   DANE dane1,dane2,dane3,dane4,dane5;
public:		// User declarations
   __fastcall TForm1(TComponent* Owner);
};

DWORD WINAPI TFunc(PVOID);

//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
