freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內容

基于android的中國象棋的設計與實現(xiàn)畢業(yè)論文-資料下載頁

2025-06-28 00:30本頁面
  

【正文】 ion) { m_maxDepth = m_searchDepth。 int i, j。 for(i = 0。 i 10。 ++i) for(j = 0。 j 9。 ++j) m_curPosition[i][j] = position[i][j]。 negaMax(m_maxDepth)。 //調用負極大值搜索引擎 try { (4000)。 } catch (InterruptedException e) { // TODO Autogenerated catch block ()。 } makeMove(bestMove)。 } //負極大值搜索引擎 public static int negaMax(int depth) { int current = 20000。 int score = 0。 int count = 0,i。 int type。 i = isGameOver(m_curPosition, depth)。 if(i != 0)//不等于0表示某方的王不存在了,直接返回 { return i。 } boolean side。 if((m_maxDepthdepth)%2 == 1) side = true。 else side = false。 if(depth = 0){//搜索到葉子節(jié)點,返回估值信息 return (m_curPosition,side)。 } //生產(chǎn)所有可能的走法, count = (m_curPosition, depth,side)。 for(i = 0。 i count 。 ++i) { //嘗試每種走法 type = makeMove([depth][i])。 //返回此種走法的估值分數(shù) score = negaMax(depth1)。 //取消上次走法 unMakeMove([depth][i],type)。 //若當前走法更優(yōu),則記錄下來 if(score current) { current = score。 //如果到了根節(jié)點S if(depth == m_maxDepth) {//記錄最優(yōu)的走棋,把它保存到m_bestMove中 bestMove = [depth][i]。 } } } return current。 }}package 。public class ConstData { public final static int NOCHESS = 0。 //無子 //黑方 public final static int B_KING = 1。 //黑帥 public final static int B_CAR = 2。 //黑車 public final static int B_HORSE = 3。 //黑馬 public final static int B_CANON = 4。 //黑炮 public final static int B_BISHOP = 5。 //黑士 public final static int B_ELEPHANT = 6。 //黑象 public final static int B_PAWN = 7。 //黑兵 public final static int B_BEGIN = 1。 public final static int B_END = 7。 //紅方 public final static int R_KING = 8。 //紅將 public final static int R_CAR = 9。 //紅車 public final static int R_HORSE = 10。 //紅馬 public final static int R_CANON = 11。 //紅炮 public final static int R_BISHOP = 12。 //紅仕 public final static int R_ELEPHANT = 13。 //紅相 public final static int R_PAWN = 14。 //紅卒 public final static int R_BEGIN = 8。 public final static int R_END = 14。 //定義每種棋的價值 //兵100,士250,象250,馬350,炮350車500 public final static int BASEVALUE_PAWN = 100。 public final static int BASEVALUE_BISHOP = public final static int BASEVALUE_ELEPHANT = public final static int BASEVALUE_HORSE = 350。 public final static int BASEVALUE_CANON = 350。 public final static int BASEVALUE_CAR = 500。 public final static int BASEVALUE_KING = 10000。 //定義各種棋子的靈活性 //也就是每多一個可走位置應加上的值 //兵15,士1,象1,車6,馬12,炮6,王0 public final static int FLEXIBLE_PAWN = 15。 public final static int FLEXIBLE_BISHOP = 1。 public final static int FLEXIBLE_ELEPHANT = 1。 public final static int FLEXIBLE_HORSE = 12。 public final static int FLEXIBLE_CANON = 6。 public final static int FLEXIBLE_CAR = 6。 public final static int FLEXIBLE_KING = 0。 //初始棋盤 public final static int INITCHESSBOARD[][]= { {2,3,6,5,1,5,6,3,2}, {0,0,0,0,0,0,0,0,0}, {0,4,0,0,0,0,0,4,0}, {7,0,7,0,7,0,7,0,7}, {0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0}, {14,0,14,0,14,0,14,0,14}, {0,11,0,0,0,0,0,11,0}, {0,0,0,0,0,0,0,0,0}, {9,10,13,12,8,12,13,10,9} }。 //判斷chessID是否是黑棋 public static boolean isBlack(int chessID) { return (chessID = B_BEGIN amp。amp。 chessID = B_END)。 } //判斷chessID是否是紅棋 public static boolean isRed(int chessID) { return (chessID = R_BEGIN amp。amp。 chessID = R_END)。 } //判斷chessID1和chessID2是否是同色 public static boolean isSameSide(int chessID1, int chessID2) { return ( (isBlack(chessID1)amp。amp。isBlack(chessID2))||(isRed(chessID1) amp。amp。 isRed(chessID2)))。 }
點擊復制文檔內容
范文總結相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1