91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 3.49MB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2023-09-10
  • 語言: C/C++
  • 標簽: 中國象棋??

資源簡介

中國象棋基本實現,規則全完成,附加棋局匹配,從文件讀入走起步驟

資源截圖

代碼片段和文件信息

#include?
#include?
#include?
using?namespace?std;
extern?int?x[11][12];//列行
void?printplate();
int?red_go(int?int?int?int);
int?black_go(int?int?int?int);
struct?Temp_chess{
int?value;
bool?valid;
};
struct?Temp_P{
Temp_chess?temp_plate[10][11];
bool?valid;
};
extern?Temp_P?t[64];
extern?int?repeat1?repeat2;

int?pos[16];
struct?Pos_match{
int?x1?y1?x2?y2;
};
Pos_match?posmatch[4];
struct?Point{?int?x?y;?};
Point?point[72];
int?step;
int?maxpoint;
int?redfull?blackfull;

void?init_temp_plate();
int?plate_equal(int?a1?int?a2);
void?plate_to_plate(int?flag);
int?equal_judge(int?index);
int?match_plate(char*?file);

int?plate_unequal(int?a1?int?a2?int?n){
int?count?=?0;
for?(int?i?=?1;?i? for?(int?j?=?1;?j? if?(t[a1].temp_plate[i][j].value?!=?t[a2].temp_plate[i][j].value){
count++;?//cout?< if?(count?>?n*2){
return?count;
}
pos[count?*?2?-?2]?=?i;
pos[count?*?2?-?1]?=?j;
}
}
}
//for?(int?k?=?0;?k? cout?< return?count;
}
int?judge_value(int?a1?int?a2?int?n){
int?count1?=?0;?int?count2?=?0;
for?(int?i?=?0;?i? if?(t[a1].temp_plate[pos[i?*?2]][pos[i?*?2?+?1]].value?>?0?||?t[a2].temp_plate[pos[i?*?2]][pos[i?*?2?+?1]].value?>?0)
count1++;?
if?(count1?>?n?*?2){
printf(“有多于%d個對象需要變動,所以前者不可以到達后者格局。\n“?n);?return?0;
}
for?(int?j?=?0;?j? if?(t[a1].temp_plate[pos[i?*?2]][pos[i?*?2?+?1]].value?>?0){
//cout?< if?((t[a1].temp_plate[pos[i?*?2]][pos[i?*?2?+?1]].value?==?t[a2].temp_plate[pos[j?*?2]][pos[j?*?2?+?1]].value)
&&?t[a2].temp_plate[pos[j?*?2]][pos[j?*?2?+?1]].valid?==0){
posmatch[count2].x1?=?pos[i?*?2];
posmatch[count2].y1?=?pos[i?*?2?+?1];
posmatch[count2].x2?=?pos[j?*?2];
posmatch[count2].y2?=?pos[j?*?2?+?1];
count2++;?
t[a2].temp_plate[pos[j?*?2]][pos[j?*?2?+?1]].valid?=?1;
}
}
}
}
if?(count1?>?count2?*?2){?printf(“后者棋局棋子數比前者多,所以不可以。%d%d\n“?count1?count2);?return?0;?}
return?count2;
}
void?posmatch_change(){
Pos_match?t;?int?m;
for?(int?i?=?3;?i?>=0;?i--){
if?(posmatch[i].x1?==?0)
m?=?i;?
}
for?(int?i?=?0;?i? if?(x[posmatch[i].x1][posmatch[i].y1]?==?12?||?x[posmatch[i].x1][posmatch[i].y1]?==?13
||?x[posmatch[i].x1][posmatch[i].y1]?==?22?||?x[posmatch[i].x1][posmatch[i].y1]?==?23){
t.x1?=?posmatch[i].x1;?t.y1?=?posmatch[i].y1;?
t.x2?=?posmatch[i].x2;?t.y2?=?posmatch[i].y2;
for?(int?j?=?i;?j? posmatch[j].x1?=?posmatch[j?+?1].x1;?posmatch[j].y1?=?posmatch[j?+?1].y1;
posmatch[j].x2?=?posmatch[j?+?1].x2;?posmatch[j].y2?=?posmatch[j?+?1].y2;
}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2015-02-21?10:44??Chinesechess\
?????目錄???????????0??2015-01-13?14:04??Chinesechess\Chinesechess\
?????文件????????4219??2015-01-10?15:51??Chinesechess\Chinesechess\Chinesechess.vcxproj
?????文件????????1225??2015-01-10?15:51??Chinesechess\Chinesechess\Chinesechess.vcxproj.filters
?????目錄???????????0??2015-01-13?14:04??Chinesechess\Chinesechess\Debug\
?????文件?????????323??2015-01-13?14:04??Chinesechess\Chinesechess\Debug\Chinesechess.log
?????目錄???????????0??2015-01-13?14:04??Chinesechess\Chinesechess\Debug\Chinesechess.tlog\
?????文件???????50104??2015-01-13?14:04??Chinesechess\Chinesechess\Debug\Chinesechess.tlog\CL.read.1.tlog
?????文件????????8428??2015-01-13?14:04??Chinesechess\Chinesechess\Debug\Chinesechess.tlog\CL.write.1.tlog
?????文件?????????153??2015-01-13?14:04??Chinesechess\Chinesechess\Debug\Chinesechess.tlog\Chinesechess.lastbuildstate
?????文件????????4332??2015-01-13?14:04??Chinesechess\Chinesechess\Debug\Chinesechess.tlog\cl.command.1.tlog
?????文件????????2550??2015-01-13?14:04??Chinesechess\Chinesechess\Debug\Chinesechess.tlog\link.command.1.tlog
?????文件????????2974??2015-01-13?14:04??Chinesechess\Chinesechess\Debug\Chinesechess.tlog\link.read.1.tlog
?????文件?????????686??2015-01-13?14:04??Chinesechess\Chinesechess\Debug\Chinesechess.tlog\link.write.1.tlog
?????文件??????188863??2015-01-13?12:04??Chinesechess\Chinesechess\Debug\change_to_plate.obj
?????文件??????131401??2014-12-17?21:35??Chinesechess\Chinesechess\Debug\chess.obj
?????文件??????151446??2014-12-21?10:48??Chinesechess\Chinesechess\Debug\chessclass.obj
?????文件??????152738??2014-12-22?00:53??Chinesechess\Chinesechess\Debug\chessplate.obj
?????文件??????154395??2015-01-13?14:04??Chinesechess\Chinesechess\Debug\game.obj
?????文件??????288751??2015-01-12?23:36??Chinesechess\Chinesechess\Debug\game_file.obj
?????文件??????138905??2015-01-12?20:59??Chinesechess\Chinesechess\Debug\main.obj
?????文件??????396288??2015-01-13?14:04??Chinesechess\Chinesechess\Debug\vc120.idb
?????文件??????430080??2015-01-13?14:04??Chinesechess\Chinesechess\Debug\vc120.pdb
?????文件????????8145??2015-01-13?12:04??Chinesechess\Chinesechess\change_to_plate.cpp
?????文件????????9592??2014-12-21?00:41??Chinesechess\Chinesechess\chessclass.cpp
?????文件????????1366??2014-12-21?10:48??Chinesechess\Chinesechess\chessclass.h
?????文件????????7779??2014-12-22?00:53??Chinesechess\Chinesechess\chessplate.cpp
?????文件????????9329??2015-01-13?14:04??Chinesechess\Chinesechess\game.cpp
?????文件????????5455??2015-01-12?23:36??Chinesechess\Chinesechess\game_file.cpp
?????文件????????1519??2015-01-12?20:58??Chinesechess\Chinesechess\main.cpp
?????文件?????8454144??2015-02-21?10:44??Chinesechess\Chinesechess.sdf
............此處省略16個文件信息

評論

共有 條評論