`
zwhc
  • 浏览: 264677 次
  • 性别: Icon_minigender_1
  • 来自: 福州
社区版块
存档分类
最新评论

delphi 自动扫雷源码

阅读更多
//http://weibo.com/wqssyq
unit frmMine;

interface

uses
Windows, SysUtils, Classes, Forms, Grids, ImgList,
ExtCtrls, StdCtrls, Controls, Buttons, Mask;
const
MineOri = 0;
Mine_0 = 1;
MineOne = 2;
MineErr = 10;
MineBlast = 11;
MineShow = 12;
type
TMine = class
private
FOpen: Boolean;
public
RoundCount: integer; //周围有几个
MineCount: integer;
MarkCount: integer;
OpenCount: integer;
isMine: Boolean;
isMarked: Boolean;
//isOpen: Boolean;
isShow: Boolean;
isPressed: Boolean;
function IsOpen: Boolean;
function IconIndex: integer;
procedure SetOpen(value: boolean);
procedure SetMarked(value: boolean);
end;

type
TForm1 = class(TForm)
StringGrid1: TStringGrid;
ImageList1: TImageList;
SpeedButton1: TSpeedButton;
Edit1: TEdit;
Timer1: TTimer;
Edit2: TEdit;
Button1: TButton;
Edit3: TEdit;
Edit4: TEdit;
MaskEdit1: TMaskEdit;
procedure StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
procedure StringGrid1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure StringGrid1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure StringGrid1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure FormActivate(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure FormKeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure Button1Click(Sender: TObject);
private
function CalMineCount(i, j: integer): integer;
function IsMine2int(i, j: integer): integer;
function CalMarkCount(i, j: integer): integer;
function IsMarked2int(i, j: integer): integer;
procedure initial;
procedure SweepEmpty;
procedure ShowAll;
procedure MarkMine(ACol, ARow: integer);
procedure ModifyMarkCount(ACol, ARow: integer; isMarked: boolean);
procedure ShowAutoSweep(ACol, ARow: integer);
procedure ShowAutoSweep2(ACol, ARow: integer);
procedure AutoSweep(ACol, ARow: integer);
procedure AutoSweep2(ACol, ARow: integer);
procedure AutoMark(ACol, ARow: integer);
procedure AutoMark2(ACol, ARow: integer);
procedure RenewAutoSweep(ACol, ARow: integer);
procedure RenewAutoSweep2(ACol, ARow: integer);
//procedure DrawIcon(ACol, ARow: integer);
function DrawIcon(ACol, ARow: integer): integer;
function CalOpenCount(i, j: integer): integer;
function IsOpen2int(i, j: integer): integer;
procedure CalRoundCount;
procedure Suspend;
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.DFM}

var
Column, Row: Longint;
ColumnOld, RowOld: Longint;
mine: array [0..29] of array [0..15] of TMine;
bAutoSweep: Boolean;
bEnd: Boolean;
SecondCount: integer;
MarkedMarkCount: integer; //被标志的雷的总数

procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
var
index: integer;
begin
index := mine[ACol, ARow].IconIndex;

with Sender as TDrawGrid do
begin
Canvas.FillRect(Rect);
ImageList1.Draw(Canvas,Rect.Left,Rect.Top,index);
if gdFocused in State then
Canvas.DrawFocusRect(Rect);
end;
end;

procedure TForm1.ModifyMarkCount(ACol, ARow: integer; isMarked: boolean);
var
MarkCount: integer;
begin
if(ACol<0) or (ACol>29) or (ARow<0) or (ARow>15) then
exit;
if isMarked then
mine[ACol, ARow].MarkCount := mine[ACol, ARow].MarkCount+1
else
begin
if mine[ACol, ARow].MarkCount>0 then
mine[ACol, ARow].MarkCount := mine[ACol, ARow].MarkCount-1;
end;
MarkCount := self.CalMarkCount(ACol, ARow);
if MarkCount<>mine[ACol, ARow].MarkCount then
mine[ACol, ARow].MarkCount := MarkCount;

end;

procedure TForm1.MarkMine(ACol, ARow: integer);
begin
mine[ACol, ARow].SetMarked(not mine[ACol, ARow].isMarked);
Edit2.Text := inttostr(MarkedMarkCount);
DrawIcon(ACol, ARow);

ModifyMarkCount(ACol-1, ARow-1, mine[ACol, ARow].isMarked);
ModifyMarkCount(ACol-1, ARow, mine[ACol, ARow].isMarked);
ModifyMarkCount(ACol-1, ARow+1, mine[ACol, ARow].isMarked);
ModifyMarkCount(ACol, ARow-1, mine[ACol, ARow].isMarked);
ModifyMarkCount(ACol, ARow+1, mine[ACol, ARow].isMarked);
ModifyMarkCount(ACol+1, ARow-1, mine[ACol, ARow].isMarked);
ModifyMarkCount(ACol+1, ARow, mine[ACol, ARow].isMarked);
ModifyMarkCount(ACol+1, ARow+1, mine[ACol, ARow].isMarked);
end;

procedure TForm1.ShowAutoSweep2(ACol, ARow: integer);
var
Rect: TRect;
begin
if(ACol<0) or (ACol>29) or (ARow<0) or (ARow>15) then
exit;
if not (mine[ACol, ARow].isMarked or
mine[ACol, ARow].isOpen) then
begin
Rect := StringGrid1.CellRect(ACol, ARow);
ImageList1.Draw(StringGrid1.Canvas, Rect.Left, Rect.Top, 1);
end;

end;

procedure TForm1.ShowAutoSweep(ACol, ARow: integer);
begin
ShowAutoSweep2(ACol-1, ARow-1);
ShowAutoSweep2(ACol-1, ARow);
ShowAutoSweep2(ACol-1, ARow+1);
ShowAutoSweep2(ACol, ARow-1);
ShowAutoSweep2(ACol, ARow+1);
ShowAutoSweep2(ACol+1, ARow-1);
ShowAutoSweep2(ACol+1, ARow);
ShowAutoSweep2(ACol+1, ARow+1);
end;

procedure TForm1.StringGrid1MouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
Rect: TRect;
begin
if (ssRight in Shift) and (ssLeft in Shift) then
begin
bAutoSweep := true;
StringGrid1.MouseToCell(X, Y, Column, Row);
ShowAutoSweep(Column, Row);
exit;
end;
if (ssRight in Shift) then
begin
StringGrid1.MouseToCell(X, Y, Column, Row);
MarkMine(Column, Row);
exit;
end;

if not (ssLeft in Shift) then
exit;
StringGrid1.MouseToCell(X, Y, Column, Row);
Rect := StringGrid1.CellRect(Column, Row);
mine[Column, Row].isPressed := true;
ImageList1.Draw(StringGrid1.Canvas, Rect.Left, Rect.Top, 1);
Timer1.Enabled := true;
end;

procedure TForm1.StringGrid1MouseMove(Sender: TObject; Shift: TShiftState;
X, Y: Integer);
var
Rect: TRect;
c, r: integer;
begin
if (ssCtrl in Shift) then
begin
StringGrid1.MouseToCell(X, Y, c, r);
Edit3.Text := inttostr(c);
Edit4.Text := inttostr(r);
end;

if not (ssLeft in Shift) then
exit;

StringGrid1.MouseToCell(X, Y, Column, Row);
if (ColumnOld<> Column) or (RowOld<>Row) then
begin
if(ColumnOld<>-1) and (RowOld<>-1) then
begin
mine[ColumnOld, RowOld].isPressed := false;
DrawIcon(ColumnOld, RowOld);
end;
if(Column<>-1) and (Row<>-1) then
begin
mine[Column, Row].isPressed := true;
Rect := StringGrid1.CellRect(Column, Row);
ImageList1.Draw(StringGrid1.Canvas, Rect.Left, Rect.Top, 1);
end;
ColumnOld := Column;
RowOld := Row;
end;
end;

procedure TForm1.initial;
var
i, j: integer;
bNotSet: Boolean;
iColumn, iRow: integer;
begin
MarkedMarkCount := 99;
Edit2.Text := inttostr(MarkedMarkCount);
timer1.Enabled := false;
SecondCount := 0;
Edit1.Text := '000';
bEnd := false;
Column :=-1;
Row := -1;
ColumnOld :=-1;
RowOld := -1;

for i := 0 to 29 do
begin
for j := 0 to 15 do
begin
mine[i, j] := TMine.Create;
mine[i, j].MineCount := 0;
mine[i, j].MarkCount := 0;
mine[i, j].OpenCount := 0;
mine[i, j].isMarked := false;
mine[i, j].isMine := false;
//mine[i, j].isOpen := false;
mine[i, j].SetOpen(false);
mine[i, j].isShow := false;
end;
end;

Randomize;
//set mine
for i := 0 to 98 do
begin
bNotSet := true;
while bNotSet do
begin
iColumn := Random(30);
iRow := Random(16);
if not mine[iColumn, iRow].isMine then
begin
bNotSet := false;
mine[iColumn, iRow].isMine := true;
end;
end;
end;

//calculate mine count
for i := 0 to 29 do
begin
for j := 0 to 15 do
begin
mine[i, j].MineCount := CalMineCount(i, j);
end;
end;
CalRoundCount;

//SweepEmpty;
end;

procedure TForm1.CalRoundCount;
var
i, j: integer;
begin
mine[0, 0].RoundCount := 3;
mine[0, 15].RoundCount := 3;
mine[29, 0].RoundCount := 3;
mine[29, 15].RoundCount := 3;

for i := 1 to 28 do
begin
mine[i, 0].RoundCount := 5;
mine[i, 15].RoundCount := 5;
end;

for j := 1 to 14 do
begin
mine[0, j].RoundCount := 5;
mine[29, j].RoundCount := 5;
end;

for i := 1 to 28 do
begin
for j := 1 to 14 do
begin
mine[i, j].RoundCount := 8;
end;
end;
end;

function TForm1.IsMine2int(i, j: integer): integer;
begin
result := 0;
if(i<0) or (i>29) or (j<0) or (j>15) then
exit;
if mine[i, j].isMine then
result := 1;
end;

function TForm1.CalMineCount(i, j: integer): integer;
begin
result := 0;
result := result + IsMine2int(i-1, j-1);
result := result + IsMine2int(i-1, j);
result := result + IsMine2int(i-1, j+1);
result := result + IsMine2int(i, j-1);
result := result + IsMine2int(i, j+1);
result := result + IsMine2int(i+1, j-1);
result := result + IsMine2int(i+1, j);
result := result + IsMine2int(i+1, j+1);
end;

procedure TForm1.ShowAll;
var
i, j: integer;
begin
for i := 0 to 29 do
begin
for j := 0 to 15 do
begin
mine[i, j].isShow := true;
end;
end;
StringGrid1.Refresh;
bEnd := true;
timer1.Enabled := false;
end;

procedure TForm1.RenewAutoSweep2(ACol, ARow: integer);
var
Rect: TRect;
begin
if(ACol<0) or (ACol>29) or (ARow<0) or (ARow>15) then
exit;
if not (mine[ACol, ARow].isMarked or
mine[ACol, ARow].isOpen) then
begin
Rect := StringGrid1.CellRect(ACol, ARow);
ImageList1.Draw(StringGrid1.Canvas, Rect.Left, Rect.Top, 0);
end;
end;

procedure TForm1.RenewAutoSweep(ACol, ARow: integer);
begin
RenewAutoSweep2(ACol-1, ARow-1);
RenewAutoSweep2(ACol-1, ARow);
RenewAutoSweep2(ACol-1, ARow+1);
RenewAutoSweep2(ACol, ARow-1);
RenewAutoSweep2(ACol, ARow+1);
RenewAutoSweep2(ACol+1, ARow-1);
RenewAutoSweep2(ACol+1, ARow);
RenewAutoSweep2(ACol+1, ARow+1);
end;

procedure TForm1.AutoSweep2(ACol, ARow: integer);
begin
if bEnd then
exit;
if(ACol<0) or (ACol>29) or (ARow<0) or (ARow>15) then
exit;
if not (mine[ACol, ARow].isMarked or
mine[ACol, ARow].isOpen) then
begin
Suspend; //Suspend
mine[ACol, ARow].SetOpen(true);
if DrawIcon(ACol, ARow) = MineBlast then
begin
ShowAll;
end;
AutoSweep(ACol, ARow);
end;
end;

procedure TForm1.AutoSweep(ACol, ARow: integer);
begin
if(ACol<0) or (ACol>29) or (ARow<0) or (ARow>15) then
exit;
if mine[ACol, ARow].MarkCount<>mine[ACol, ARow].MineCount then
begin
RenewAutoSweep(ACol, ARow);
exit;
end;

AutoSweep2(ACol-1, ARow-1);
AutoSweep2(ACol-1, ARow);
AutoSweep2(ACol-1, ARow+1);
AutoSweep2(ACol, ARow-1);
AutoSweep2(ACol, ARow+1);
AutoSweep2(ACol+1, ARow-1);
AutoSweep2(ACol+1, ARow);
AutoSweep2(ACol+1, ARow+1);

AutoMark(ACol-1, ARow-1);
AutoMark(ACol-1, ARow);
AutoMark(ACol-1, ARow+1);
AutoMark(ACol, ARow-1);
AutoMark(ACol, ARow+1);
AutoMark(ACol+1, ARow-1);
AutoMark(ACol+1, ARow);
AutoMark(ACol+1, ARow+1);
end;

procedure TForm1.StringGrid1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
IconIndex: integer;
begin
if bAutoSweep then
begin
StringGrid1.MouseToCell(X, Y, Column, Row);
AutoSweep(Column, Row);
bAutoSweep := false;
StringGrid1.Refresh;
exit;
end;
if mine[Column, Row].isMarked then
exit;

if Button = mbRight then
exit;

mine[Column, Row].isPressed := false;
mine[Column, Row].SetOpen(true);
IconIndex := DrawIcon(Column, Row);
if IconIndex = MineBlast then
begin
ShowAll;
end;

if IconIndex = Mine_0 then
begin
AutoSweep(Column, Row);
end;

Column :=-1;
Row := -1;
ColumnOld :=-1;
RowOld := -1;
end;

{ TMine }

function TMine.IconIndex: integer;
begin
result := 0;
if self=nil then
exit;
if isMarked then
begin
if isShow and (not isMine) then
result := MineErr
else
result := 13;
exit;
end;

if isShow then
begin
if isMine then
begin
result := MineShow;
end
else
begin
result := MineCount + 1;
end;
end;

if isPressed then
begin
result := 1;
end;

if isOpen then
begin
if isMine then
begin
result := MineBlast;
end
else
begin
result := MineCount + 1;
end;
end;
end;

procedure TForm1.FormActivate(Sender: TObject);
begin
initial;
end;

procedure TForm1.SpeedButton1Click(Sender: TObject);
begin
initial;
StringGrid1.Refresh;
end;

function TMine.IsOpen: Boolean;
begin
result := FOpen;
end;

procedure TMine.SetMarked(value: boolean);
begin
if self<>nil then
begin
if isOpen then
exit;
isMarked := value;
if value=true then
MarkedMarkCount := MarkedMarkCount-1
else
MarkedMarkCount := MarkedMarkCount+1;
end;
end;

procedure TMine.SetOpen(value: boolean);
begin
if self<>nil then
begin
if isMarked then
exit;
FOpen := value;
end;
end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
SecondCount := SecondCount + 1;
Edit1.Text := inttostr(SecondCount);
end;

function TForm1.IsMarked2int(i, j: integer): integer;
begin
result := 0;
if(i<0) or (i>29) or (j<0) or (j>15) then
exit;
if mine[i, j].isMarked then
result := 1;
end;

function TForm1.CalMarkCount(i, j: integer): integer;
begin
result := 0;
result := result + IsMarked2int(i-1, j-1);
result := result + IsMarked2int(i-1, j);
result := result + IsMarked2int(i-1, j+1);
result := result + IsMarked2int(i, j-1);
result := result + IsMarked2int(i, j+1);
result := result + IsMarked2int(i+1, j-1);
result := result + IsMarked2int(i+1, j);
result := result + IsMarked2int(i+1, j+1);
end;

function TForm1.DrawIcon(ACol, ARow: integer): integer;
var
Rect: TRect;
IconIndex: integer;
begin
Rect := StringGrid1.CellRect(ACol, ARow);
IconIndex := mine[ACol, ARow].IconIndex;
ImageList1.Draw(StringGrid1.Canvas, Rect.Left, Rect.Top, IconIndex);
result := IconIndex;
end;

procedure TForm1.FormKeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if (Key = 112) then
SweepEmpty;
end;

procedure TForm1.SweepEmpty;
var
i, j: integer;
begin
timer1.Enabled := true;
for j := 0 to 15 do
begin
for i := 0 to 29 do
begin
if (mine[i, j].MineCount = 0) and (not mine[i, j].isMine)
and (not mine[i, j].IsOpen) then
begin
mine[i, j].SetOpen(true);
DrawIcon(i, j);
AutoSweep(i, j);
exit;
end;
end;
end;
end;

function TForm1.IsOpen2int(i, j: integer): integer;
begin
result := 0;
if(i<0) or (i>29) or (j<0) or (j>15) then
exit;

if mine[i, j].IsOpen then
result := 1;
end;

function TForm1.CalOpenCount(i, j: integer): integer;
begin
result := 0;
result := result + IsOpen2int(i-1, j-1);
result := result + IsOpen2int(i-1, j);
result := result + IsOpen2int(i-1, j+1);
result := result + IsOpen2int(i, j-1);
result := result + IsOpen2int(i, j+1);
result := result + IsOpen2int(i+1, j-1);
result := result + IsOpen2int(i+1, j);
result := result + IsOpen2int(i+1, j+1);
end;

procedure TForm1.AutoMark2(ACol, ARow: integer);
begin
if(ACol<0) or (ACol>29) or (ARow<0) or (ARow>15) then
exit;

if mine[ACol, ARow].isMarked or mine[ACol, ARow].IsOpen then
exit;

//mine[ACol, ARow].SetMarked(true);
MarkMine(ACol, ARow);
DrawIcon(ACol, ARow);
Suspend;
end;

procedure TForm1.AutoMark(ACol, ARow: integer);
var
iOpen, iMark, iMine: integer;
begin
if(ACol<0) or (ACol>29) or (ARow<0) or (ARow>15) then
exit;
if mine[ACol, ARow].isMarked then
exit;
//exit;
iOpen := CalOpenCount(ACol, ARow);
iMark := CalMarkCount(ACol, ARow);
iMine := mine[ACol, ARow].MineCount;
//if mine[ACol, ARow].RoundCount= iOpen + iMark +iMine then
if (iMine<1) then
exit;
if (iMine = mine[ACol, ARow].RoundCount - iOpen)
and (iMine>iMark) then
begin
AutoMark2(ACol-1, ARow-1);
AutoMark2(ACol-1, ARow);
AutoMark2(ACol-1, ARow+1);
AutoMark2(ACol, ARow-1);
AutoMark2(ACol, ARow+1);
AutoMark2(ACol+1, ARow-1);
AutoMark2(ACol+1, ARow);
AutoMark2(ACol+1, ARow+1);

AutoSweep(ACol-1, ARow-1);
AutoSweep(ACol-1, ARow);
AutoSweep(ACol-1, ARow+1);
AutoSweep(ACol, ARow-1);
AutoSweep(ACol, ARow+1);
AutoSweep(ACol+1, ARow-1);
AutoSweep(ACol+1, ARow);
AutoSweep(ACol+1, ARow+1);
end;
end;

procedure TForm1.Button1Click(Sender: TObject);
var
iOpen, iMark, iMine: integer;
ACol, ARow: integer;
begin
ACol := strtoint(edit3.text);
ARow := strtoint(edit4.text);
iOpen := CalOpenCount(ACol, ARow);
iMark := CalMarkCount(ACol, ARow);
iMine := mine[ACol, ARow].MineCount;
Caption := inttostr(iOpen) + ' Open ' +
inttostr(iMark) + ' Mark ' +
inttostr(iMine) + ' Mine ';
end;

procedure TForm1.Suspend;
var
NumSec: SmallInt;
StartTime: Double;
begin
try
NumSec := strtoint(trim(MaskEdit1.Text));
if (NumSec<0) or (NumSec>999) then
begin
NumSec := 50;
end;
except
on E: EConvertError do
begin
NumSec := 50;
MaskEdit1.Text := '50';
end;
end;

if NumSec=0 then
exit;

StartTime := now;
repeat
Application.ProcessMessages;
until Now > StartTime + NumSec * (1/24/60/60/1000);
end;

end.  
0
2
分享到:
评论

相关推荐

    delphi 扫雷游戏源码

    delphi开发的扫雷程序。 自己初学delphi时编写的,因为当时win7还未问世,XP的扫雷雷块太小了,作为一名扫雷爱好者,于是就写了一个雷块放大版的扫雷游戏。(win7的扫雷显然也意识到这个问题,变得可以无限缩放了,...

    DELPHI版扫雷源码

    用DELPHI7编写的扫雷源码,没有加入声音,另外加入了放大功能,还有查看雷区的功能,在操作上完全与WINDOW的相同,左键右键 中键,左右键同时按时效果与原版相同。

    Delphi 软件源码Delphi 软件源码Delphi 软件源码Delphi 软件源码Delphi 软件源码Delphi 软件

    5. **仿win9x扫雷程序的源码**:源码可能包含了实现经典扫雷游戏的所有逻辑,包括计时、游戏规则、用户界面等,适合学习游戏开发和Windows API的应用。 6. **制作API钩子和截获API的例子**:API钩子技术常用于拦截...

    delphi 扫雷源码

    delphi 扫雷 源码,比较简单,容易看懂。

    Delphi 经典扫雷游戏源码.rar

    而用Delphi编写的扫雷源码,为我们提供了一个深入理解面向对象编程、事件驱动编程以及Delphi特性的绝佳实例。下面我们将详细探讨Delphi扫雷游戏源码中的关键知识点。 首先,Delphi是一种基于Object Pascal的集成...

    delphi扫雷游戏源码

    delphi扫雷源码,不是很难,下载可用,放心下载

    Delphi扫雷程序源码下载

    【标题】"Delphi扫雷程序源码下载"揭示了这个资源是一个使用Delphi编程语言编写的扫雷游戏的源代码。Delphi是一款强大的Windows应用开发工具,它基于Object Pascal编程语言,以其高效的编译器和直观的集成开发环境...

    扫雷新版Delphi源码下载..rar

    这个“扫雷新版Delphi源码下载..rar”压缩包很可能是包含了一些使用最新版本Delphi编写的源代码示例或者项目,用于帮助开发者学习、理解和实践Delphi编程技术。 在Delphi编程中,有几个关键知识点是每个开发者都...

    不一样的Delphi扫雷游戏源码,有立体效果..rar

    本文将深入探讨一个独特的Delphi扫雷游戏源码,其亮点在于引入了立体效果,为传统的扫雷游戏带来了全新的视觉体验。 首先,让我们了解一下Delphi。Delphi是一款基于Object Pascal语言的集成开发环境(IDE),由...

    Delphi 高级扫雷程序.rar

    Delphi 高级扫雷程序,界面和功能和Windows自带的扫雷游戏非常相似,不过功能方面就不太相同了,带声音和帮助文件。。。。Function 程序的主要代码部分,是程序的主体部分,在运用四连通算法进行展开区域时使用到的...

    delphi版本的扫雷源代码

    经典的DELPHI版本的扫雷源程序,可下载后根据自己的需要进行必要的修改。

    扫雷(Delphi源码)

    记得当初编这个游戏的...功能外(那个时候不会写,现在也懒得写,呵呵),其它的功能均与Windows自带的扫雷功能一样。这里只有源码源码和可执行程序到 http://math.whu.edu.cn/homepage/franczx/program/mine.zip 下载

    Delphi二维扫雷游戏源代码,有立体效果.rar

    通过学习和分析这款Delphi扫雷游戏源代码,开发者可以获得关于游戏编程、图形渲染、事件处理和算法实现等方面的宝贵经验。对于初学者,这是一个了解Delphi编程和游戏开发的好起点;对于有经验的开发者,它可以提供...

    Delphi7扫雷游戏及源码

    《Delphi扫雷游戏及源码》,不错的Delphi学习材料『RAR需解压』 --注: 1.本人发资源纯为与诸位共享,发布前均做过测试保证可用。 2.如果下载后打不开请重新再试,可能是网络传输问题。 3.如有疑问请...

    扫雷delphi版

    总的来说,这个“扫雷Delphi版”项目是一个个人开发的、基于Delphi的扫雷游戏,提供了源码供学习者研究。通过它,我们可以学习到Delphi的控件使用、面向对象编程、事件处理、图形绘制等方面的知识,同时也是一个实践...

    delphi 写的扫雷程序源码

    一个用delphi 写的扫雷程序,转过来,有兴趣的朋友可以参考一下

    扫雷(DELPHI课的作业)

    3. 源码结构:扫雷游戏的源代码通常会包含以下部分: - 主程序文件(如:Project1.dpr):定义程序入口点,初始化和运行游戏。 - 主窗体文件(如:Form1.pas):定义游戏界面和控件,实现事件处理函数。 - 游戏...

    扫雷 (含源码)

    以前看到别人玩“扫雷”时手脚麻利的样子总是羡慕不已,今年暑假,我脑子一热,决定要用Delphi 编出自己的扫雷出来,于是就着手开始构思,想在扫雷里加入一些新增的功能,前思后想,还是觉得不如完全模仿微软操作...

    DELPHI 扫雷高手 内存扫雷 源程序

    `Delphi扫雷外挂.htm`很可能是关于如何使用这个“扫雷外挂”的帮助文档,讲述了如何利用内存扫描技术提高游戏体验。 从源码学习中,我们可以深入理解以下几点: 1. **事件驱动编程**:DELPHI使用事件驱动模型,用户...

    Delphi 扫雷游戏网络版.rar

    《Delphi扫雷游戏网络版》是一款基于Delphi编程语言开发的网络对战版扫雷游戏,它在设计上充分借鉴了Windows XP内置扫雷的经典风格,为玩家提供了熟悉而舒适的体验。该游戏不仅具备基本的单人游戏模式,还创新性地...

Global site tag (gtag.js) - Google Analytics