xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 9KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-05-27
  • 語言: C/C++
  • 標簽: 斗地主??c語言版??

資源簡介

這是我剛學c語言時老師給我們的大作業--斗地主。 里面有簡單的界面,AI,由于是初學時的作品,所以相當的簡陋,不過對剛學c語言的朋友們還是有參考作用的

資源截圖

代碼片段和文件信息

/*?Note:Your?choice?is?C?IDE?*/

/****************************************************************
??查找牌中大于x的最小的單牌,返回該牌的大小,如未找到返回-1
*/
int?search_min_single(struct?card?*headint?x)
{
int?dou=0;
struct?card?*tmp1*tmp2*tmp3;
tmp1=tmp2=tmp3=(struct?card?*)malloc(sizeof(struct?card));
tmp1=head->next;
tmp2=tmp1->next;
tmp3=0;
do
{
if(tmp1->num==tmp2->num)
{
dou++;
}
else
{
if(dou==0)
{
if(tmp1->num>x)
tmp3=tmp1;
????}
else
{
dou=0;
}
}
tmp1=tmp2;
tmp2=tmp2->next;
}while(tmp1!=0);
if(tmp3==0)
return?-1;
else
return?tmp3->num;
}


/****************************************************************
???查找牌中大于xx的最小的牌如找到返回該牌第一張的大小,如未找到返回-1
*/
int?search_min_double(struct?card?*headint?x)
{
struct?card?*p1*p2*p3*p4*tmp;
p1=p2=p3=p4=tmp=(struct?card?*)malloc(sizeof(struct?card));
p1=head;
tmp=-1;
do
{
p2=p1->next;
????p3=p2->next;
????p4=p3->next;
????if(p1->num!=p2->num&&p2->num==p3->num&&p3->num!=p4->num)
????{
???? if(p2->num>x)
???? {
???? tmp=p2;
???? }
????}
????p1=p1->next;
}while(p4!=0);
if(tmp==-1)
return?-1;
else
return?tmp->num;
}

/****************************************************************
???查找牌中大于xxx的最小的牌如找到返回該牌第一張的大小,如未找到返回-1
*/
int?search_min_triangle(struct?card?*headint?x)
{
struct?card?*p1*p2*p3*p4*p5*tmp;
p1=p2=p3=p4=p5=tmp=(struct?card?*)malloc(sizeof(struct?card));
p1=head;
tmp=-1;
do
{
p2=p1->next;
????p3=p2->next;
????p4=p3->next;
????p5=p4->next;
????if(p1->num!=p2->num&&p2->num==p3->num&&p3->num==p4->num&&p4->num!=p5->num)
????{
???? if(p2->num>x)
???? {
???? tmp=p2;
???? }
????}
????p1=p1->next;
}while(p5!=0);
if(tmp==-1)
return?-1;
else
return?tmp->num;
}

/****************************************************************
???查找牌中大于xxxx的最小的牌并刪除,如成功,返回1,反之,返回0
*/
int?search_min_fourfold(struct?card?*headstruct?card?*tableint?x)
{
struct?card?*p1*p2*p3*p4*p5*p6*tmp;
p1=p2=p3=p4=p5=p6=tmp=(struct?card?*)malloc(sizeof(struct?card));
p1=head;
tmp=-1;
do
{
p2=p1->next;
????p3=p2->next;
????p4=p3->next;
????p5=p4->next;
????p6=p5->next;
????if(p1->num!=p2->num&&p2->num==p3->num&&p3->num==p4->num&&p4->num==p5->num&&p5->num!=p6->num)
????{
???? if(p2->num>x)
???? {
???? tmp=p2;
???? }
????}
????p1=p1->next;
}while(p6!=0);
if(tmp==-1)
return?0;
else
{
p1=tmp->next;
p2=p1->next;
p3=p2->next;
p4=p3->next;
tmp->next=p4->next;
for(p5=table;p5->next!=0;p5=p5->next){}??/*將tmp3連接到table上去*/
p5->next=p1;
p5=p1;
p5->next=p2;
p5=p2;
p5->next=p3;
p5=p3;
p5->next=p4;
p4->next=0;
}
return?1;
}

/*****************************************************************
?查找牌中大小等于x的牌,如找到,返回改牌在鏈表中的序列號,反之,返回-1
*/
int?search_value_equal_x(struct?card?*headint?x)
{
int?positioni;
struct?card?*tmp;
tmp=(struct?card?*)

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件??????17737??2008-01-03?18:08??斗地主\Ai.c

?????文件???????6087??2007-12-02?14:54??斗地主\ChuPai.c

?????文件???????9473??2008-01-09?08:22??斗地主\HuaPai.c

?????文件???????6096??2008-01-04?10:24??斗地主\main.c

?????目錄??????????0??2009-01-15?11:48??斗地主

-----------?---------??----------?-----??----

????????????????39393????????????????????5


評論

共有 條評論