From cdcfcdd355d607d9664ecbf68a8ea971b49d7474 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Thu, 15 Feb 2018 22:43:20 +0100 Subject: [PATCH] Initial Commit --- Pixelbalttle.cfg | 35 ++++++++++++ Pixelbalttle.dof | 83 +++++++++++++++++++++++++++ Pixelbalttle.dpr | 13 +++++ Pixelbalttle.res | Bin 0 -> 1332 bytes uPixelbattle.dfm | 28 ++++++++++ uPixelbattle.pas | 142 +++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 301 insertions(+) create mode 100644 Pixelbalttle.cfg create mode 100644 Pixelbalttle.dof create mode 100644 Pixelbalttle.dpr create mode 100644 Pixelbalttle.res create mode 100644 uPixelbattle.dfm create mode 100644 uPixelbattle.pas diff --git a/Pixelbalttle.cfg b/Pixelbalttle.cfg new file mode 100644 index 0000000..b593b6e --- /dev/null +++ b/Pixelbalttle.cfg @@ -0,0 +1,35 @@ +-$A8 +-$B- +-$C+ +-$D+ +-$E- +-$F- +-$G+ +-$H+ +-$I+ +-$J- +-$K- +-$L+ +-$M- +-$N+ +-$O+ +-$P+ +-$Q- +-$R- +-$S- +-$T- +-$U- +-$V+ +-$W- +-$X+ +-$YD +-$Z1 +-cg +-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; +-H+ +-W+ +-M +-$M16384,1048576 +-K$00400000 +-LE"c:\programme\delphi\Projects\Bpl" +-LN"c:\programme\delphi\Projects\Bpl" diff --git a/Pixelbalttle.dof b/Pixelbalttle.dof new file mode 100644 index 0000000..b4a11cc --- /dev/null +++ b/Pixelbalttle.dof @@ -0,0 +1,83 @@ +[FileVersion] +Version=6.0 + +[Compiler] +A=8 +B=0 +C=1 +D=1 +E=0 +F=0 +G=1 +H=1 +I=1 +J=0 +K=0 +L=1 +M=0 +N=1 +O=1 +P=1 +Q=0 +R=0 +S=0 +T=0 +U=0 +V=1 +W=0 +X=1 +Y=1 +Z=1 +ShowHints=1 +ShowWarnings=1 +UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; + +[Linker] +MapFile=0 +OutputObjs=0 +ConsoleApp=1 +DebugInfo=0 +RemoteSymbols=0 +MinStackSize=16384 +MaxStackSize=1048576 +ImageBase=4194304 +ExeDescription= + +[Directories] +OutputDir= +UnitOutputDir= +PackageDLLOutputDir= +PackageDCPOutputDir= +SearchPath= +Packages=vcl;rtl;vclx;VclSmp;vclshlctrls;fileinfo;gif;Indy60;semipanel;Zip;Simons;ztreeviewpack;trayico;Transbutton +Conditionals= +DebugSourceDirs= +UsePackages=0 + +[Parameters] +RunParams= +HostApplication= +Launcher= +UseLauncher=0 +DebugCWD= + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1031 +CodePage=1252 + +[Version Info Keys] +CompanyName=Yeminy +FileVersion=0.002 +LegalCopyright=(c) by Yeminy +ProductVersion=0.002 diff --git a/Pixelbalttle.dpr b/Pixelbalttle.dpr new file mode 100644 index 0000000..16a1f5c --- /dev/null +++ b/Pixelbalttle.dpr @@ -0,0 +1,13 @@ +program Pixelbalttle; + +uses + Forms, + uPixelbattle in 'uPixelbattle.pas' {Form1}; + +{$R *.res} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/Pixelbalttle.res b/Pixelbalttle.res new file mode 100644 index 0000000000000000000000000000000000000000..fa4815bd62f97b9cd4706cf591b0be4faf835427 GIT binary patch literal 1332 zcmaJ=OKTHR6#mA9WL9m0g1dGWE-HwO8c^t>m1>~i3o8XzP1N2fX`9m4K*_>^LJb7` z9o+|#!XRYj@93fncXruD$@M$u&g6lQo1A;jcg}Yn_c9j%0*bXxXilx4*V1@~98Y6~ zLOz?47H9;NWr~Ny&75=y6b0*6d*Q=>rKVE5$;XlPQ5?H@5FI)GM~6F7)k!uxF73@ zh&|5JZuMG^81{3f;$44mTD;jbUE#AK9Y^JrEh7W~C1A+V^N zE~5l(sl(C5<)h4~Hc#%9&bEgB*z6#0M{+T5EoF%^hrIm;&;H<7a|V350G1M&Cl;9< z{6i#`3Ul(5%q3900xpN}u56SU+Ot_J>jr?3V(ko`<1tq8g0g~_)ajah7xEfB1VL6` zg}fpUCwxAE)+qe-EuDBJM%S^14en3zn%1gz*wB7u+Ooc9e+{Lc6Y+@6gX<1tshuZr zQ2FXu!vXg22|K8vOudCoR^EX@gPe1vhbZx+4=E+iAQRn1p7mD9*~Tuai{yL+3*k`=KOj#i-hWy>9y^I-hpOI5z#Vzf!%la~94Ieo#uz>ft zjR5cH4=~*=)LyU1Z{PzylX<|qo9;N-?}-dRMwJ=qgyS0kZt3m4VN}k!&xxw6IG#P9 HJ= 490000 then + begin + timer1.Enabled:=false; + if blue-red>0 then showmessage('blue WINS!'); + if blue-red<0 then showmessage('Red WINS!'); + if blue-red=0 then showmessage('DRAW!'); + end; + end; + +end; + +procedure TForm1.pixelrandom; +var i,j,c:integer; + tempcolor,tempcolor2:TColor; +begin + + i:=random(form1.Width); + j:=random(form1.Height); + tempcolor:=canvas.Pixels[i,j]; + + inc(tred); + + if tempcolor=clsilver then + begin + c:=random(14); + if c=0 then tempcolor2:=clblack; + if c=1 then tempcolor2:=clred; + if c=2 then tempcolor2:=clgreen; + if c=3 then tempcolor2:=clwhite; + if c=4 then tempcolor2:=clblue; + if c=5 then tempcolor2:=clyellow; + if c=6 then tempcolor2:=clpurple; + if c=7 then tempcolor2:=clmaroon; + if c=8 then tempcolor2:=clnavy; + if c=9 then tempcolor2:=cllime; + if c=10 then tempcolor2:=clteal; + if c=11 then tempcolor2:=clfuchsia; + if c=12 then tempcolor2:=claqua; + if c=13 then tempcolor2:=clgray; + canvas.Pixels[i,j]:=tempcolor2; + end; + +end; + +procedure TForm1.pixelred; +var i,j:integer; + tempcolor:TColor; +begin + + i:=random(form1.Width); + j:=random(form1.Height); + tempcolor:=canvas.Pixels[i,j]; + + inc(tred); + + if tempcolor=clsilver then + begin + canvas.Pixels[i,j]:=clred; + inc(red); + end; + +end; + +procedure TForm1.pixelblue; +var i,j:integer; + tempcolor:TColor; +begin + + i:=random(form1.Width); + j:=random(form1.Height); + tempcolor:=canvas.Pixels[i,j]; + + inc(tblue); + + if tempcolor=clsilver then + begin + canvas.Pixels[i,j]:=clblue; + inc(blue); + end; + +end; + +end.