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

正文內(nèi)容

基于java語言的中國象棋設(shè)計與實現(xiàn)畢業(yè)設(shè)計-免費閱讀

2024-09-28 15:28 上一頁面

下一頁面
  

【正文】 if (play[M].getName().charAt(1) == 39。 chessPlayClick=3。 ((i))。amp。k()。j32。 (() ()) =58){ (()57,(),55,55)。amp。 (()()) 55 amp。 在卒移動算法中,將卒的移動分為向前、向左 、向右 三部分。//兵 } GenMoves 根據(jù)當前局面(作為參數(shù)的 final ChessPosition Position)生成合法著法,并保存在一個數(shù)組 MoveStruct moveList[MAX_MOVENUM]中,同 時也將每個著法的局面評價值存入數(shù)組 int valueList[MAX_MOVENUM]中,這樣以便對著法進行排序,在搜索算法中提高算法的效率。 if (src 0 || src = 90 || dst 0 || dst = 90) {//invalid move src = dst = 1。] + (1) 39。 北京物資學院 2020屆畢業(yè)論文(設(shè)計) 19 chk = false。 } else { return = [x][BitWord] + y。 (Player!=0 ? 16 : 32))!=0) { return == [y][BitWord] + Bottom[x]。//有被攻擊的棋子,但不是對方的。 } } 合法著法的生成 合法著法的生成,是在已生成的偽合法著法的基礎(chǔ)之上,增加一些判斷合法性的條件。 } } for (。 FileCannonCapMax[i][j] = k。 k ++) { if ((j amp。 Index ++。 Index ++。 FileNonCapMin[i][j] = k。 FileNonCapMax[i][j] = k。 j ++) {//一條縱線位棋盤的二進制值 Index = 0。 //車橫線照將 public static final BitBoard[][] RankCannonCheck=new BitBoard[18][512]。 RankRookCapMoves[2][101][0]=2 RankRookCapMoves[2][101][1]=3 RankRookCapMoves[2][101][2]=0 以上是車吃子的走法。 public static final int[][] RankRookCapMin=new int[9][512]。 //FileNonCapMax[y][bitwordY]=MaxY//進退 public static final int[][] FileNonCapMin=new int[10][1024]。 KnightMoves 和 HorseLegs 是馬的著法和蹩馬腿的位置。帥(將)在某個位置最多有 4 種走法,例如 KingMoves[13][0]=12 表示帥在 13 格( e1 格)時可以走到 12 格(當然,也可以走到 1 22 格,保存到其他幾個數(shù)組元素中)。 數(shù)組及其下標的含義 : 保存帥(將)、仕(士)、相(相)、馬、兵的偽合法靜態(tài)數(shù)組如下: public static final int[][] KingMoves=new int[90][8]。 偽合法著法的生成 偽合法著法包含幾類: 各兵種的不吃子著法 ; 各兵種的吃子著法 ; “將 ”和擺脫 “將 ”的著法 。如果引擎在檢查了一部分著法后發(fā)現(xiàn)了必須走的棋,那它就無需生成余下的棋步了。//初始化為 0 ZobristLock=0。 for (i = 0。 (RandSeed)。//改變走子方的 key public static long ZobristLockPlayer。 Zobrist 鍵值的實現(xiàn)方法 實現(xiàn) Zobrist 必須從多維的 64 位數(shù)組開始,每個數(shù)組含有一個隨機數(shù)。當把它們用作散列表鍵值的時候會非常有效。 /* clear the captured piece */ = (,bitMask[h9])。例如記錄白子所在位置的“WhitePieces”位棋盤。 piece_in_square[2] = RED_BISHOP。//黑士 BitBoard redPawns。//黑車 BitBoard redKnights。它包含了一個整型數(shù)組 int piece_in_square[90],還包含了一些位棋盤。然而,他們的初始化方式相同。當 90位中有非 0位時返回 true。 int mid= amp。 Java 中 “與、或 、非、異或、左位移,右位移(注意,位棋盤的右位移是無符號位移) ”分別是 “amp。在 Java 中,用 3 個 int類型數(shù)據(jù)(每個 32 位,共 96 位多余的 6 位不用)表示一個位棋盤。 Microsoft Windows 9X/NT/vista 操作系統(tǒng)。中國象棋作為我國保存最完整、最能代表我國古代文化的游戲之一,它的推廣能夠 讓世界更加了解中國。 北京物資學院 2020屆畢業(yè)論文(設(shè)計) 3 2 分析 需求分析 現(xiàn)在全球超過十億臺計算機正在被使用,并且這個數(shù)目還在逐漸增加,計算機已經(jīng)深入到我們生活的各個方面。 想要提高中國象棋的知名度和普及率 ,就 必須要有一個大眾化的中國象棋游戲平臺,電腦游戲無疑是最佳選擇。 關(guān) 鍵 詞 : 中國象棋,位棋盤, Zobrist 鍵值 ,著發(fā)生成 【 Abstract】 The implement of playing Chinese Chess on puter has just started. Although large numbers of professional websites and professional chess software arised in domestic, the lack of necessary basic work causes the advantage of puter technology applications in Chinese chess can’t be reflected. With the development of artificial intelligence and puter hardware, the level of puter chess program continues to be improved. This paper studies the research status of Chinese chess, analyzes the demand of Chinese chess, and learns the feasibility of Chinese chess that is designed by Java language. At the same time, the function is designed with the successful experience of chess program, such as the place board, Zobrist keys, etc. Chinese chess program is summarized some ways to design Chinese chess program for solve a range of issues. Follow this ways, it designs all the rules and funtions which adapt to the requirement of Chinese chess, including of movement, judgement, undo, restart and so application gives the implementation method in JAVA language and beautiful interface. Keywords: Chinese Chess, bit board, zobrist keys 目 錄 1 緒論 ...................................................................................................................................1 研究背景 ....................................................................................................................1 研究意義 ....................................................................................................................1 預(yù)期目標 ....................................................................................................................1 2 分析 ...................................................................................................................................3 需求分析 ....................................................................................................................3 可行性分析 ................................................................................................................3 功能分析 ....................................................................................................................3 硬件環(huán)境 ....................................................................................................................4 開發(fā)環(huán)境 .............................................................................................................4 運行環(huán)境 .............................................................................................................4 3 界面設(shè)計框架 ...................................................................................................................5 程序的框架 ................................................................................................................5 ——位棋盤 ........................................................................................5 什么是位棋盤 ....................................................................................................5 位棋盤的作用 ....................................................................................................6 位棋盤的基本運算 ............................................................................................6 Java 中位棋盤的實現(xiàn) .........................................................................................6
點擊復制文檔內(nèi)容
畢業(yè)設(shè)計相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1