-
Notifications
You must be signed in to change notification settings - Fork 1
/
UResult.pas
72 lines (62 loc) · 2.25 KB
/
UResult.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
unit UResult;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, pngimage, ExtCtrls;
type
TFormResult = class(TForm)
ImageWin: TImage;
ButtonNew: TButton;
ButtonQuit: TButton;
Bevel1: TBevel;
LabelTime: TLabel;
LabelCTime: TLabel;
ButtonStatistics: TButton;
ListBoxStatistics: TListBox;
procedure FormShow(Sender: TObject);
procedure ButtonStatisticsClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FormResult: TFormResult;
Stat:Boolean;
implementation
{$R *.dfm}
uses Main;
procedure TFormResult.FormShow(Sender: TObject);
begin
case Game.GameState of
gsGame:Application.Terminate;
gsWin: ImageWin.Picture.Graphic:=Bitmaps.Win;
gsLose: ImageWin.Picture.Graphic:=Bitmaps.Lose;
end;
LabelCTime.Caption:=IntToStr(Game.Time)+' ñåê.';
ListBoxStatistics.Clear;
ListBoxStatistics.Items.Add('Âàø ñ÷åò: '+IntToStr(Statistics.Bonus));
ListBoxStatistics.Items.Add('Âðåìÿ èãðû: '+IntToStr(Statistics.LastTime)+' ñåê.');
ListBoxStatistics.Items.Add('Êîë-âî õîäîâ: '+IntToStr(Statistics.Clicks));
ListBoxStatistics.Items.Add('');
ListBoxStatistics.Items.Add('Îáùàÿ ñòàòèñòèêà');
ListBoxStatistics.Items.Add('Ìèíèìàëüíîå âðåìÿ: '+IntToStr(Statistics.MinTime)+' ñåê.');
ListBoxStatistics.Items.Add('Ìàêñèìàëüíîå âðåìÿ: '+IntToStr(Statistics.MaxTime)+' ñåê.');
ListBoxStatistics.Items.Add('Ïîáåä: '+IntToStr(Statistics.Win));
ListBoxStatistics.Items.Add('Íåóäà÷: '+IntToStr(Statistics.Lose));
ListBoxStatistics.Items.Add('Íåóäà÷, íå ñ÷èòàÿ íåóäà÷íûõ íà÷àë: '+IntToStr(Statistics.Lose-Statistics.FirstBoom));
ListBoxStatistics.Items.Add('Íåóäà÷íîå íà÷àëî: '+IntToStr(Statistics.FirstBoom));
ListBoxStatistics.Items.Add('Ìèíèìàëüíîå êîë-âî õîäîâ: '+IntToStr(Statistics.MinClicks));
ListBoxStatistics.Items.Add('Ìàêñèìàëüíîå êîë-âî î÷êîâ: '+IntToStr(Statistics.MaxBonus));
end;
procedure TFormResult.ButtonStatisticsClick(Sender: TObject);
begin
if Stat then ClientHeight:=160 else ClientHeight:=300;
Stat:=not Stat;
end;
procedure TFormResult.FormCreate(Sender: TObject);
begin
Stat:=False;
end;
end.