21点纸牌 c#做的,仅供学习交流使用
private void button8_Click(object sender, System.EventArgs e)
{
//要牌
if(lab2>21)
{
pictureBox12.Visible=true;
label17.Visible =true;
label17.Text ="爆牌,你输了!!!--->>";
pictureBox6.Image =Image.FromFile (Directory.GetCurrentDirectory() "\\image\\" a[1] ".bmp");
label15.Visible=true;label16.Text=Convert.ToString (lab1);
label8.Text =Convert.ToString (Convert.ToUInt32(label8.Text) 1);
label2.Text=Convert.ToString(Convert.ToInt32(label2.Text) Convert.ToInt32(label12.Text));label12.Text="0";
button1.Visible=true;
button2.Visible=true;
button3.Visible=true;
button4.Visible=true;
button6.Visible=false;
}
else
{
switch(q)
{
case 2:
{
q ;pictureBox3.Visible=true;
pictureBox3.Image =Image.FromFile (Directory.GetCurrentDirectory() "\\image\\" a[8] ".bmp");
lab2=lab2 z[8];
if(a[7]<5||a[8]<5||a[6]<5)
label14.Text=Convert.ToString(lab2 10) " or " Convert.ToString(lab2);
else label14.Text=Convert.ToString(lab2);
if(lab2>21)
{
pictureBox12.Visible=true;
label17.Visible =true;
pictureBox6.Image =Image.FromFile (Directory.GetCurrentDirectory() "\\image\\" a[1] ".bmp");
label15.Visible=true;label16.Text=Convert.ToString (lab1);
label17.Text ="爆牌,你输了!!!--->>";
label8.Text =Convert.ToString (Convert.ToUInt32(label8.Text) 1);
label2.Text=Convert.ToString(Convert.ToInt32(label2.Text) Convert.ToInt32(label12.Text));label12.Text="0";
button1.Visible=true;
button2.Visible=true;
button3.Visible=true;
button4.Visible=true;
button6.Visible=false;
}//爆牌
else
{
if(a[6]>24&&a[6]<29&&a[7]>24&&a[7]<29&&a[8]>24&&a[8]<29)
{ pictureBox13.Visible=true;
pictureBox6.Image =Image.FromFile (Directory.GetCurrentDirectory() "\\image\\" a[1] ".bmp");
label15.Visible=true;label16.Text=Convert.ToString (lab1);
label17.Visible =true;label17.Text ="你拿到3个7,赢得4倍赌金!!--->>";// 闲家得到3个7
label4.Text=Convert.ToString(Convert.ToInt32(label12.Text)*5 Convert.ToInt32(label4.Text));//赢得赌注的四倍
label6.Text =Convert.ToString (Convert.ToUInt32(label6.Text) 1);
label2.Text=Convert.ToString(Convert.ToInt32(label2.Text)-Convert.ToInt32(label12.Text)*4);
label12.Text="0";
button1.Visible=true;
button2.Visible=true;
button3.Visible=true;
button4.Visible=true;
button6.Visible=false;
}
}break;
}
case 3:
{
q ;pictureBox4.Visible =true;
pictureBox4.Image =Image.FromFile(Directory.GetCurrentDirectory() "\\image\\" a[9] ".bmp");
lab2=lab2 z[9];
if(a[7]<5||a[8]<5||a[6]<5||a[9]<5) //判断是否有A
label14.Text=Convert.ToString(lab2 10) " or " Convert.ToString(lab2);
else label14.Text=Convert.ToString(lab2);
if(lab2>21)
{
pictureBox12.Visible=true;
label17.Visible =true;
pictureBox6.Image =Image.FromFile (Directory.GetCurrentDirectory() "\\image\\" a[1] ".bmp");
label15.Visible=true;label16.Text=Convert.ToString (lab1);
label17.Text ="爆牌,你输了!!!--->>";
label8.Text =Convert.ToString (Convert.ToUInt32(label8.Text) 1);
label2.Text=Convert.ToString(Convert.ToInt32(label2.Text) Convert.ToInt32(label12.Text));label12.Text="0";
button1.Visible=true;
button2.Visible=true;
button3.Visible=true;
button4.Visible=true;
button6.Visible=false;
}//爆牌
break;
}
case 4:
{
q ;pictureBox5.Visible=true;
pictureBox5.Image =Image.FromFile(Directory.GetCurrentDirectory() "\\image\\" a[10] ".bmp");
lab2=lab2 z[10];
label14.Text=Convert.ToString (lab2);
if(lab2>21)
{
pictureBox12.Visible=true;
label17.Visible =true;
pictureBox6.Image =Image.FromFile (Directory.GetCurrentDirectory() "\\image\\" a[1] ".bmp");
label15.Visible=true;label16.Text=Convert.ToString (lab1);
label17.Text ="爆牌,你输了!!!--->>";
label8.Text =Convert.ToString (Convert.ToUInt32(label8.Text) 1);
label2.Text=Convert.ToString(Convert.ToInt32(label2.Text) Convert.ToInt32(label12.Text));label12.Text="0";
button1.Visible=true;
button2.Visible=true;
button3.Visible=true;
button4.Visible=true;
button6.Visible=false;
} //爆牌
else
{
pictureBox13.Visible=true;
pictureBox6.Image =Image.FromFile (Directory.GetCurrentDirectory() "\\image\\" a[1] ".bmp");
label15.Visible=true;label16.Text=Convert.ToString (lab1);
label17.Visible =true;label17.Text ="你拿牌已达5张都没爆,你赢得5倍赌金!!-->>";//闲家5张牌了还没有爆,并且庄家不是blackjack
label4.Text=Convert.ToString(Convert.ToInt32(label12.Text)*6 Convert.ToInt32(label4.Text));//赢得赌注的五倍
label6.Text =Convert.ToString (Convert.ToUInt32(label6.Text) 1);
label2.Text=Convert.ToString(Convert.ToInt32(label2.Text)-Convert.ToInt32(label12.Text)*5);label12.Text="0";
button1.Visible=true;
button2.Visible=true;
button3.Visible=true;
button4.Visible=true;
button6.Visible=false;
}
break;}
default:break;
}
}
}
资源文件列表
源码文件/21点纸牌游戏.csproj , 5660
源码文件/AssemblyInfo.cs , 1846
源码文件/App.ico , 1078
源码文件/WindowsApplication1.suo , 8192
源码文件/WindowsApplication1.sln.old , 934
源码文件/Form4.resx , 50939
源码文件/21点纸牌游戏.sln , 907
源码文件/21点纸牌游戏.csproj.user , 2083
源码文件/21点纸牌游戏.suo , 17408
源码文件/UpgradeLog.XML , 4168
源码文件/Form1.resx , 2890365
源码文件/Form1.cs , 77176
源码文件/Form4.cs , 11731
源码文件/Form3.cs , 33127
源码文件/Form3.resx , 6184
源码文件/Form2.cs , 4836
源码文件/Form2.resx , 5814
源码文件/Properties/Resources.resx , 5817
源码文件/Properties/Resources.Designer.cs , 2860
源码文件/_UpgradeReport_Files/UpgradeReport.css , 3348
源码文件/_UpgradeReport_Files/UpgradeReport_Minus.gif , 69
源码文件/_UpgradeReport_Files/UpgradeReport_Plus.gif , 71
源码文件/_UpgradeReport_Files/UpgradeReport.xslt , 12218
源码文件/Backup/21点纸牌游戏.sln , 909
源码文件/Backup/21点纸牌游戏.suo , 7680
源码文件/Backup/21点纸牌游戏.csproj , 6417
源码文件/Backup/21点纸牌游戏.csproj.user , 1805
源码文件/Backup/AssemblyInfo.cs , 1846
源码文件/Backup/Form1.cs , 67959
源码文件/Backup/Form2.cs , 4222
源码文件/Backup/Form3.cs , 29826
源码文件/Backup/Form4.cs , 11731
源码文件/Backup/App.ico , 1078
源码文件/Backup/Form1.resx , 2921026
源码文件/Backup/Form2.resx , 8663
源码文件/Backup/Form3.resx , 25297
源码文件/Backup/Form4.resx , 50939
源码文件/bin/Debug/AxInterop.WMPLib.dll , 61440
源码文件/bin/Debug/Interop.WMPLib.dll , 331776
源码文件/bin/Debug/WindowsApplication1.pdb , 122368
源码文件/bin/Debug/21点纸牌游戏.exe , 2027520
源码文件/bin/Debug/21点纸牌游戏.ico , 3638
源码文件/bin/Debug/21点纸牌游戏.pdb , 71168
源码文件/bin/Debug/21点纸牌游戏.vshost.exe , 5632
源码文件/bin/Debug/music/2.mp3 , 3068344
源码文件/bin/Debug/image/12.bmp , 3574
源码文件/bin/Debug/image/13.bmp , 3574
源码文件/bin/Debug/image/14.bmp , 3574
源码文件/bin/Debug/image/15.bmp , 3574
源码文件/bin/Debug/image/16.bmp , 3574
源码文件/bin/Debug/image/17.bmp , 3574
源码文件/bin/Debug/image/20.bmp , 3574
源码文件/bin/Debug/image/21.bmp , 3574
源码文件/bin/Debug/image/22.bmp , 3574
源码文件/bin/Debug/image/23.bmp , 3574
源码文件/bin/Debug/image/24.bmp , 3574
源码文件/bin/Debug/image/25.bmp , 3574
源码文件/bin/Debug/image/26.bmp , 3574
源码文件/bin/Debug/image/27.bmp , 3574
源码文件/bin/Debug/image/28.bmp , 3574
源码文件/bin/Debug/image/29.bmp , 3574
源码文件/bin/Debug/image/30.bmp , 3574
源码文件/bin/Debug/image/31.bmp , 3574
源码文件/bin/Debug/image/32.bmp , 3574
源码文件/bin/Debug/image/33.bmp , 3574
源码文件/bin/Debug/image/34.bmp , 3574
源码文件/bin/Debug/image/35.bmp , 3574
源码文件/bin/Debug/image/36.bmp , 3574
源码文件/bin/Debug/image/37.bmp , 3574
源码文件/bin/Debug/image/38.bmp , 3574
源码文件/bin/Debug/image/39.bmp , 3574
源码文件/bin/Debug/image/40.bmp , 3574
源码文件/bin/Debug/image/41.bmp , 3574
源码文件/bin/Debug/image/42.bmp , 3574
源码文件/bin/Debug/image/43.bmp , 3574
源码文件/bin/Debug/image/44.bmp , 3574
源码文件/bin/Debug/image/45.bmp , 3574
源码文件/bin/Debug/image/46.bmp , 3574
源码文件/bin/Debug/image/47.bmp , 3574
源码文件/bin/Debug/image/48.bmp , 3574
源码文件/bin/Debug/image/49.bmp , 3574
源码文件/bin/Debug/image/50.bmp , 3574
源码文件/bin/Debug/image/51.bmp , 3574
源码文件/bin/Debug/image/52.bmp , 3574
源码文件/bin/Debug/image/53.bmp , 3574
源码文件/bin/Debug/image/18.bmp , 3574
源码文件/bin/Debug/image/19.bmp , 3574
源码文件/bin/Debug/image/4.bmp , 3574
源码文件/bin/Debug/image/5.bmp , 3574
源码文件/bin/Debug/image/6.bmp , 3574
源码文件/bin/Debug/image/7.bmp , 3574
源码文件/bin/Debug/image/8.bmp , 3574
源码文件/bin/Debug/image/9.bmp , 3574
源码文件/bin/Debug/image/10.bmp , 3574
源码文件/bin/Debug/image/11.bmp , 3574
源码文件/bin/Debug/image/2.bmp , 3574
源码文件/bin/Debug/image/3.bmp , 3574
源码文件/bin/Debug/image/1.bmp , 3574
源码文件/obj/Interop.WMPLib.dll , 327680
源码文件/obj/AxInterop.WMPLib.dll , 61440
源码文件/obj/21点纸牌游戏.csproj.FileList.txt , 669
源码文件/obj/Debug/WindowsApplication1.projdata , 26760
源码文件/obj/Debug/WindowsApplication1.exe.incr , 3202
源码文件/obj/Debug/WindowsApplication1.pdb , 122368
源码文件/obj/Debug/WindowsApplication1.projdata1 , 30088
源码文件/obj/Debug/WindowsApplication1.Form2.resources , 180
源码文件/obj/Debug/WindowsApplication1.Form3.resources , 180
源码文件/obj/Debug/WindowsApplication1.Form1.resources , 1923717
源码文件/obj/Debug/21点纸牌游戏.projdata , 33160
源码文件/obj/Debug/WindowsApplication1.exe , 2080768
源码文件/obj/Debug/WindowsApplication1.Form4.resources , 33850
源码文件/obj/Debug/21点纸牌游戏.exe , 2027520
源码文件/obj/Debug/21点纸牌游戏.exe.incr , 3178
源码文件/obj/Debug/Interop.WMPLib.dll , 331776
源码文件/obj/Debug/AxInterop.WMPLib.dll , 61440
源码文件/obj/Debug/21点纸牌游戏.csproj.ResolveComReference.cache , 492
源码文件/obj/Debug/WindowsApplication1.Properties.Resources.resources , 180
源码文件/obj/Debug/21点纸牌游戏.pdb , 71168
源码文件/obj/Debug/21点纸牌游戏.csproj.GenerateResource.Cache , 1016
源码文件/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll , 4096
21点纸牌游戏文档.doc , 781824
