Unit Forza4

Classes

TForza4 -

Functions

Register - Registratie

Types

TBlock
TForza4Grid
TPlayer
TPlayerKind
TWinGameEvent

Constants

mxColumns
mxRows

Variables


Functions


procedure Register;

Registratie

Types


TBlock = record
Player : TPlayer;
Filled : Boolean;
end;

TForza4Grid   = Array[0..mxColumns-1,0..mxRows-1] of TBlock;

TPlayer       = (ppPlayer1, ppPlayer2, ppNone);

TPlayerKind   = (plHuman, plComputer);

TWinGameEvent = procedure(Sender: TObject; Player: TPlayer) of Object

Constants

mxColumns = 60

----------------------------------------- TForza4.pas: Component to easily implement the Forza4-game in your application. properties: DarkColor: color of dark pieces LightColor: '' ' light pieces LineColor: color of lines BackColor: color of BackGround Player1: Type of player for pl1. (human/cpu) Player2: '' ' '' '' pl2. '' '' GridColumns: No. of columns in grid GridRows: No. of rows in grid DrawLines: Draw the lines yes or no WhoIsonturn: Who is next turn? events: OnfalseMove: Occurs when player clicks on full column OnWingame: Occurs when somebody wins the game Important methods: NewGame: Starts a new game. Click: Let a piece drop in the column pointed to with the mouse. Revision history **************** 05-09-97: Started with the component (0.1) 06-09-97: Finished first release of component (1.0) Information **************** Made by: Arjan Scherpenisse, ACS Software Date: 06-09-97 E-Mail: A.Scherpenisse@inter.nl.net Thanks To: Marco Bianchini for the idea of implementing Forza4

mxRows = 60


Variables