Visual Studio 2008 Express Edition ¤Ç¥È¥é¥ó¥×¥²¡¼¥à¤òºî¤í¤¦
4ÆüÌܤγؽ¬
©Form1¤Ë
¥Æ¥¥¹¥È¥Ü¥Ã¥¯¥¹1¤È£²¥Á¥Ã¥¯¥Ü¥Ã¥¯¥¹¤È¥Ü¥¿¥ó¤òÄɲ乤ë
ªForm1¥Ç¥¶¥¤¥ó¢ª¡¡checkBox¥Á¥§¥¯¥Ü¥Ã¥¯¥¹£±¤«¤é£µ¤ò¥À¥Ö¥ë¥¯¥ê¥Ã¥¯¤·¤ÆÀÖ»ú¤òÄɲÃ
private: System::Void checkBox1_CheckedChanged(System::Object^ sender, System::EventArgs^ e) {
hoji1=1;
}
private: System::Void checkBox2_CheckedChanged(System::Object^ sender, System::EventArgs^ e) {
hoji2=1;
}
private: System::Void checkBox3_CheckedChanged(System::Object^ sender, System::EventArgs^ e) {
hoji3=1;
}
private: System::Void checkBox4_CheckedChanged(System::Object^ sender, System::EventArgs^ e) {
hoji4=1;
}
private: System::Void checkBox5_CheckedChanged(System::Object^ sender, System::EventArgs^ e) {
hoji5=1;
}
«Form1¥Ç¥¶¥¤¥ó¢ª¡¡¥Ü¥¿¥ó£²¤ò¥À¥Ö¥ë¥¯¥ê¥Ã¥¯¤·¤ÆÀÖ»ú¤òÄɲÃ
private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {
if(start_flag==1){
int nohai;
int xx=6;
int x,y,w;
char buf[80];
/*
¥Æ¥¥¹¥È¥Ü¥Ã¥¯¥¹ÆþÎϤòÆɤ߼è¤ë¤Ë¤Ï¡¢
¡¡¡¡¡¡
String^ string1=textBox1->Text;
¥Æ¥¥¹¥È¥Ü¥Ã¥¯¥¹¤Ëɽ¼¨¤¹¤ë¤Ë¤Ï¡¢
¡¡¡¡¡¡
textBox1->Text=string1;
*/
String^ string1= "¥Ö¥¿¤Ç¤¹";
textBox1->Text=string1;
if (hoji1==0){hai[1]=card[xx]; xx++;}
if (hoji2==0){hai[2]=card[xx]; xx++;}
if (hoji3==0){hai[3]=card[xx]; xx++;}
if (hoji4==0){hai[4]=card[xx]; xx++;}
if (hoji5==0){hai[5]=card[xx]; }
for(xx=1;xx<6;xx++){
nohai=hai[xx];
DispHai(nohai,xx);
} //end for
start_flag=2;
} ¡¡¡¡//end if start_flag==1
}
¬Form1¥Ç¥¶¥¤¥ó¢ª¡¡¥Ü¥¿¥ó3¤ò¥À¥Ö¥ë¥¯¥ê¥Ã¥¯¤·¤ÆÀÖ»ú¤òÄɲÃ
private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) {
if (start_flag==2){
int nohai;
int xx;
for(xx=1;xx<6;xx++){
nohai=0;
DispHai(nohai,xx);
}
start_flag=0;
}
}
//Rem ¥Õ¥é¥Ã¥·¥å
int club = 0;
int daiya = 0;
int hart = 0;
int supedo = 0;
int flash = 0;
for(x=1;x<6;x++){
if( hai[x] > 0 && hai[x] <= 13) {supedo = supedo + 1;}
if( hai[x] > 100 && hai[x] <= 113 ) {club=club + 1;}
if( hai[x] > 200 && hai[x] <= 213 ) {daiya = daiya + 1;}
if( hai[x] > 300 && hai[x] <= 313 ) {hart = hart + 1;}
}¡¡¡¡ //Next x
if( club == 5){
string1= "¥¯¥é¥Ö¤Î¥Õ¥é¥Ã¥·¥å";
flash = 1;
tokuten = tokuten + 509;
}¡¡¡¡//End If clab
if (daiya == 5){
string1= "¥À¥¤¥ä¤Î¥Õ¥é¥Ã¥·¥å";
flash = 1;
tokuten = tokuten + 509;
}¡¡¡¡//End If daiya
if( hart == 5 ){
string1= "¥Ï¡¼¥È¤Î¥Õ¥é¥Ã¥·¥å";
flash = 1;
tokuten = tokuten + 509;
}¡¡¡¡//End If hart
if( supedo == 5){
string1= "¥¹¥Ú¡¼¥É¤Î¥Õ¥é¥Ã¥·¥å";
flash = 1;
tokuten = tokuten + 509;
}¡¡¡¡//End If supedo
textBox1->Text=string1;
//ʸ»ú¤Ç¿ô¤ò³Îǧ
sprintf_s(buf,80,"supedo=%3d club=%3d daiy=%3d hart=%3d",supedo,club,daiya,hart);
string1=gcnew String(buf);
textBox5->Text=string1;
//ʸ»ú¤Ç³Îǧ½ªÎ»
//Rem ¥Õ¥é¥Ã¥·¥åend
//Rem ¥Ú¥¢¡¼
int twopai = 0;
int threepai = 0;
int oitoku;
for(x=6;x<11;x++){
keta[x] = 0;
}¡¡¡¡//Next x
for(x=1;x<6;x++){
y=hai[x];
if(hai[x]>100) y=hai[x]-100;
if(hai[x]>200) y=hai[x]-200;
if(hai[x]>300) y=hai[x]-300;
keta[x]=y;
}¡¡¡¡//Next x
for(x=1;x<6;x++){
yaku[x] = 0;
for(w=1;w<6;w++){
if( keta[x] == keta[w]) yaku[x] = yaku[x] + 1;
}¡¡¡¡//Next w
}¡¡¡¡//Next x
for(x=1;x<6;x++){
if( yaku[x]== 2) twopai = twopai + 1;
if( yaku[x]== 3) threepai = 1;
if( yaku[x]== 4){
string1 = "¥Õ¥©¡¼¥«¡¼¥É";
tokuten = tokuten + 4165;
}¡¡//End if( yaku[x]== 4)
}¡¡//Next x
if( twopai == 2 ){
string1 = "¥ï¥ó¥Ú¡¼¥¢";
tokuten = tokuten + 3;
}¡¡¡¡//End If( twopai == 2 )
if( twopai == 4 ){
string1 = "¥Ä¡¼¥Ú¡¼¥¢";
tokuten = tokuten + 21;
}¡¡¡¡//End If( twopai == 4 )
if( threepai == 1){
string1 = "¥¹¥ê¡¼¥«¡¼¥É";
tokuten = tokuten + 47;
}¡¡¡¡//End If( threepai == 1)
if( twopai == 2 && threepai == 1){
string1 = "¥Õ¥ë¥Ï¥¦¥¹";
tokuten = tokuten + 694;
}¡¡¡¡//End If
textBox1->Text=string1;
//Rem ¥Ú¥¢¡¼end
//Rem ¥¹¥È¥ì¡¼¥È
for(x=1;x<6;x++){
for(y=1;y<6;y++){
if( keta[x] < keta[y]){
oitoku = keta[x];
keta[x] = keta[y];
keta[y] = oitoku;
}¡¡¡¡//End If
}¡¡¡¡//Next y
}¡¡¡¡//Next x
if (keta[1] == 1){
for(x=1;x<6;x++){
if( keta[x] = x) keta[x + 5] = keta[x] + 13;
}// Next x
}//End if (keta[1] == 1)
int flag = 0;
for(x=1;x<10;x++){
if (keta[x] == keta[x + 1] - 1) flag = flag + 1;
}¡¡¡¡//Next x
if( flag >= 4){
string1 = string1 + " ¥¹¥È¥ì¡¼¥È";
tokuten = tokuten + 255;
if( flash == 1) tokuten = tokuten + 72193 - 255;
if( flash == 1 && flag >= 4 && keta[1] == 1 && keta[5] == 13){
string1 = "¥í¡¼¥ä¥ë¥¹¥È¥ì¡¼¥È¥Õ¥é¥Ã¥·¥å";
tokuten = tokuten + 649740;
}¡¡¡¡//End If
¡¡¡¡¡¡//TextBox2 = tokuten
}¡¡¡¡//End If
textBox1->Text=string1;
//Rem ¥¹¥È¥ì¡¼¥Èend
textBox2->Text=tokuten.ToString();¡¡¡¡//¿ôÃͤ«¤éʸ»úÎó¤Ø¤ÎÊÑ´¹¤Ë¤Ï¡¢
//textBox2->Text=string2;
start_flag=2;
} ¡¡¡¡//end if start_flag==1
}
¤ò²¡¤·¤Æ¼Â¹Ô¤·¤Æ¤ß¤ë
·ë²Ì
¤³¤ì¤¬É½¼¨¤µ¤ì¤ì¤ÐÀ®¸ù¤Ç¤¹
¸«ËÜ toranpu2.exe toranpu2.zip