Теми рефератів
> Реферати > Курсові роботи > Звіти з практики > Курсові проекти > Питання та відповіді > Ессе > Доклади > Учбові матеріали > Контрольні роботи > Методички > Лекції > Твори > Підручники > Статті Контакти
Реферати, твори, дипломи, практика » Курсовые обзорные » Розробка програми-ігри "Шашки"

Реферат Розробка програми-ігри "Шашки"





tByNumber (x, y));;;. Pen. Color: = clBlack;. Pen. Style: = psSolid;. Pen. Width: = 1;. Brush. Style: = bsClear;

// Canvas. Rectangle (0, (Height mod 8), Width - (Width mod 8), Height);. Rectangle (0, 0, Width, Height);

{Намалюємо шашки} Board = nil Then Exit; y: = 1 To 8 Dox: = 1 To 8 DoBoard. GetDraught (x, y) <> nil Then (x, y, Board. GetDraught (x, y). Side, Board. GetDraught (x, y). Kind);;;; TVisualChessBoard. GetCellRectByNumber (x, y: Integer): TRect;. Left: = Trunc ((x-1) * (Width/8));. Right: = Trunc (x * (Width/8));. Top: = Height-Trunc (y * (Height/8));. Bottom: = Height-Trunc ((y-1) * (Height/8));; TVisualChessBoard. GetCellNumberByCoord (xCoord, yCoord: Integer; Var x, y: Integer);: = 1 + Trunc (xCoord/(Width/8));: = 8-Trunc (yCoord/(Height/8));; TVisualChessBoard. DrawDraught (x, y: Integer; Side: Integer; Kind: Integer); = 5;, tR: TRect;. Pen. Color: = clSilver;. Pen. Style: = psSolid;. Pen. Width: = 3;. Brush. Style: = bsSolid; Side = sdWhite Then Canvas. Brush. Color: = clWhite Else Canvas. Brush. Color: = clBlack;: = GetCellRectByNumber (x, y);. Ellipse (R. Left + dR, R. Top + dR, R. Right-dR, R. Bottom-dR); Kind = kdKing Then Begin: = R;. Left: = tR. Left + ((tR. Right-tR. Left) div 4);. Right: = tR. Right - ((tR. Right-tR. Left) div 4);. Top: = tR. Top + ((tR. Bottom-tR. Top) div 4);. Bottom: = tR. Bottom - ((tR. Bottom-tR. Top) div 4);. Ellipse (R);;; TVisualChessBoard. DrawMove (x, y: Integer); = 5;: TRect;. Pen. Color: = clLime;. Pen. Style: = psSolid;. Pen. Width: = 1;. Brush. Color: = clLime;. Brush. Style: = bsDiagCross;: = GetCellRectByNumber (x, y);. Ellipse (R. Left + dR, R. Top + dR, R. Right-dR, R. Bottom-dR);; TVisualChessBoard. DrawStrike (x, y: Integer); = 5;: TRect;. Pen. Color: = clRed;. Pen. Style: = psSolid;. Pen. Width: = 1;. Brush. Color: = clRed;. Brush. Style: = bsDiagCross;: = GetCellRectByNumber (x, y);. Ellipse (R. Left + dR, R. Top + dR, R. Right-dR, R. Bottom-dR);; TVisualChessBoard. DrawMoves (Const Moves, Strikes: TList);: PCellPosition;: Integer; Moves <> nil Theni: = 0 To Moves. Count-1 Do: = Moves. Items [i]; (CP ^. X, CP ^. Y);; Strikes <> nil Theni: = 0 To Strikes. Count-1 Do: = Strikes. Items [i]; (CP ^. X, CP ^. Y);;; TVisualChessBoard. DrawMovesByNumber (x, y: Integer);, Strikes, Strickens: TList;. FindMoves (x, y, Moves, Strikes, Strickens); (Moves, Strikes); (Moves); (Strikes); (Strickens);;. About;, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, , Buttons, ExtCtrls, ShellApi; = class (TForm): TBitBtn;: TLabel;: TMemo;: TLabel; bbOkClick (Sender: TObject); FormCreate (Sender: TObject);

{Private declarations}

{Public declarations};: TfmAbout;

{$ R *. DFM} TfmAbout.bbOkClick (Sender: TObject);;; TfmAbout. FormCreate (Sender: TObject);. Text: = 'ПРАВИЛА ГРИ. '; p align=...


Назад | сторінка 14 з 15 | Наступна сторінка





Схожі реферати:

  • Реферат на тему: Peculiarities of prose style
  • Реферат на тему: Style of popular scientific prose
  • Реферат на тему: Створення Windows 8-style ui застосунку
  • Реферат на тему: Маркетингове дослідження ринку комп'ютерної техніки на прикладі ТОВ &qu ...
  • Реферат на тему: Henry Miller's philosophy and style in "Tropic of cancer", &q ...