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

正文內(nèi)容

基于android的中國象棋的設(shè)計與實現(xiàn)畢業(yè)論文-閱讀頁

2025-07-13 00:30本頁面
  

【正文】 mport 。//是否播放聲音 MediaPlayer startSound。//游戲聲音 Handler myHandler = new Handler(){//用來更新UI線程中的控件 public void handleMessage(Message msg) { if( == 1){ //WeleView或HelpView或GameView傳來的消息,切換到MenuView initMenuView()。//初始化并切換到游戲界面 } else if( == 3){//MenuView傳來的消息,切換到HelpView initHelpView()。 public void onCreate(Bundle savedInstanceState) {//重寫的onCreate (savedInstanceState)。 getWindow().setFlags( , )。//加載歡迎聲音 (true)。//游戲過程的背景聲音 (true)。//初始化歡迎界面 } public void initWeleView(){//初始化歡迎界面 (new WeleView(this,this))。//播放聲音 } } public void initGameView(){//初始化游戲界面 (new GameView(this,this))。//停止播放聲音 startSound = null。//播放聲音 } (new MenuView(this,this))。//切換到幫助界面 }}package 。//表明是什么棋子 int fromX。 int toX。 int score。//棋子的類型 = fromX。 = toX。//棋子的目標(biāo)點y坐標(biāo) = score。public class SearchEngine { //表示棋盤棋的分布 public static int m_curPosition[][] = new int[10][9]。 //走法產(chǎn)生七器33 public static GuiZe moveGen = new GuiZe()。 //搜索深度 public static int m_searchDepth。 //移動棋子 public static void searchAgoodMove(int position[][]){} public static int makeMove(ChessMove data) { int chessID。 m_curPosition[][] = m_curPosition[][]。 return chessID。 boolean redLive = false, blackLive = false。 i 3。 j 6。 } for(i = 7。 ++i) for(j = 3。 ++j) { if(position[i][j] == 8) redLive = true。//取當(dāng)前奇偶標(biāo)志 if(!redLive)//紅將不在了 { if(i != 0) return 19990 + depth。 } if(!blackLive) if(0 != i) return 19990depth。 return 0。 m_curPosition[][] = chessID。public class NegamaxEngine extends SearchEngine{ public NegamaxEngine(){ } public static ChessMove Search(int[][] position){ searchAgoodMove(position)。 } public static void searchAgoodMove(int[][] position) { m_maxDepth = m_searchDepth。 for(i = 0。 ++i) for(j = 0。 ++j) m_curPosition[i][j] = position[i][j]。 //調(diào)用負(fù)極大值搜索引擎 try { (4000)。 } makeMove(bestMove)。 int score = 0。 int type。 if(i != 0)//不等于0表示某方的王不存在了,直接返回 { return i。 if((m_maxDepthdepth)%2 == 1) side = true。 if(depth = 0){//搜索到葉子節(jié)點,返回估值信息 return (m_curPosition,side)。 for(i = 0。 ++i) { //嘗試每種走法 type = makeMove([depth][i])。 //取消上次走法 unMakeMove([depth][i],type)。 //如果到了根節(jié)點S if(depth == m_maxDepth) {//記錄最優(yōu)的走棋,把它保存到m_bestMove中 bestMove = [depth][i]。 }}package 。 //無子 //黑方 public final static int B_KING = 1。 //黑車 public final static int B_HORSE = 3。 //黑炮 public final static int B_BISHOP = 5。 //黑象 public final static int B_PAWN = 7。 public final static int B_END = 7。 //紅將 public final static int R_CAR = 9。 //紅馬 public final static int R_CANON = 11。 //紅仕 public final static int R_ELEPHANT = 13。 //紅卒 public final static int R_BEGIN = 8。 //定義每種棋的價值 //兵100,士250,象250,馬350,炮350車500 public final static int BASEVALUE_PAWN = 100。 public final static int BASEVALUE_ELEPHANT = public final static int BASEVALUE_CANON = 350。 public final static int BASEVALUE_KING = 10000。 public final static int FLEXIBLE_BISHOP = 1。 public final static int FLEXIBLE_HORSE = 12。 public final static int FLEXIBLE_CAR = 6。 //初始棋盤 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} }。amp。 } //判斷chessID是否是紅棋 public static boolean isRed(int chessID) { return (chessID = R_BEGIN amp。 chessID = R_END)。amp。amp。
點擊復(fù)制文檔內(nèi)容
范文總結(jié)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1