Class TForza4 (unit Forza4)

Inherits from

TGraphicControl

Constructors


constructor Create(AOwner:TComponent);

Constructor


Functions

procedure Click;

Protected declarations

procedure newGame;

Diagonaal: /

procedure CheckForWinner;


procedure ClearGrid;


procedure DrawBlock(X,Y: Integer;P:TPlayer);


procedure fSetBackColor(C:TColor);


procedure fSetColumns(N:Integer);


procedure fSetDarkColor(C:TColor);


procedure fSetDrawLines(B:Boolean);


procedure fSetLightColor(C:TColor);


procedure fSetLineColor(C:TColor);


procedure fSetRows(N:Integer);

Properties - write-methodes

procedure Paint;

Paint - methode

procedure SetBlockAt(X,Y:integer; P:TPlayer);


procedure SetSampleBlocks;


Properties

property BackColor : TColor


property DarkColor : TColor


property DrawLines : Boolean


property GridColumns : Integer


property GridRows : Integer

Public declarations

property LightColor : TColor


property LineColor : TColor


property Player1 : TPlayerkind


property Player2 : TPlayerkind


property WhoIsOnTurn : TPlayer


Events

event OnFalseMove : TNotifyevent


event OnWinGame : TWinGameEvent


Variables

fBackColor : TColor;


fColumns : Integer;


fDarkColor : TColor;


fDrawLines : Boolean;


fGrid : TForza4grid;


fLightColor : TColor;


fLineColor : TColor;


fOnfalseMove : TNotifyEvent;


fOnWinGame : TWinGameEvent;


fPlayer1 : TPlayerkind;


fPlayer2 : TPlayerkind;


fPlaying : Boolean;


fRows : Integer;


fWhosOnTurn : TPlayer;



Constructors


constructor Create(AOwner:TComponent);

Constructor


Functions


procedure Click;

Protected declarations


procedure newGame;

Diagonaal: /


procedure CheckForWinner;


procedure ClearGrid;


procedure DrawBlock(X,Y: Integer;P:TPlayer);


procedure fSetBackColor(C:TColor);


procedure fSetColumns(N:Integer);


procedure fSetDarkColor(C:TColor);


procedure fSetDrawLines(B:Boolean);


procedure fSetLightColor(C:TColor);


procedure fSetLineColor(C:TColor);


procedure fSetRows(N:Integer);

Properties - write-methodes


procedure Paint;

Paint - methode


procedure SetBlockAt(X,Y:integer; P:TPlayer);


procedure SetSampleBlocks;


Properties


property BackColor : TColor


property DarkColor : TColor


property DrawLines : Boolean


property GridColumns : Integer


property GridRows : Integer

Public declarations


property LightColor : TColor


property LineColor : TColor


property Player1 : TPlayerkind


property Player2 : TPlayerkind


property WhoIsOnTurn : TPlayer


Events


event OnFalseMove : TNotifyevent


event OnWinGame : TWinGameEvent


Variables


fBackColor : TColor;


fColumns : Integer;


fDarkColor : TColor;


fDrawLines : Boolean;


fGrid : TForza4grid;


fLightColor : TColor;


fLineColor : TColor;


fOnfalseMove : TNotifyEvent;


fOnWinGame : TWinGameEvent;


fPlayer1 : TPlayerkind;


fPlayer2 : TPlayerkind;


fPlaying : Boolean;


fRows : Integer;


fWhosOnTurn : TPlayer;