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

正文內(nèi)容

基于motorola手機的五子棋游戲開發(fā)技術(shù)設(shè)計書(編輯修改稿)

2025-07-19 06:24 本頁面
 

【文章內(nèi)容簡介】 = chessesValue。 int xx = x。//循環(huán)變量的值 int yy = y。//循環(huán)變量的值 int tempx=x,tempy=y。//存儲當(dāng)前傳入的值,便于以后從這個點開始進行判斷 /** * 縱向判斷 */ xx=tempx。 yy=tempy。//讓目前的值與傳入的值保持一致 int count = 0。//用來計算當(dāng)前某一方的棋子是否夠五個 while(yy=0 amp。amp。 chesses[yy][xx]!=null amp。amp。 chesses[yy][xx].getChessesValue()==value) { count++。 yy。 if(yy0)break。 } yy=tempy+1。 while(yychessMapGrid amp。amp。 chesses[yy][xx]!=null amp。amp。 chesses[yy][xx].getChessesValue()==value) { count++。 yy++。 if(yychessMapGrid)break。 } if(count == 5) return true。 /** * 橫向判斷 */ xx=tempx。 yy=tempy。//讓目前的值與傳入的值保持一致 count = 0。//用來計算當(dāng)前某一方的棋子是否夠五個 while(xx=0 amp。amp。 chesses[yy][xx]!=null amp。amp。 chesses[yy][xx].getChessesValue()==value) { count++。 xx。 if(xx0)break。 } xx=tempx+1。 while(xxchessMapGrid amp。amp。 chesses[yy][xx]!=null amp。amp。 chesses[yy][xx].getChessesValue()==value) { count++。 xx++。 if(xxchessMapGrid)break。 } if(count == 5) return true。 /** * 反向?qū)蔷€ */ xx=tempx。 yy=tempy。//讓目前的值與傳入的值保持一致 count = 0。//用來計算當(dāng)前某一方的棋子是否夠五個 while(xx=0 amp。amp。 yychessMapGrid amp。amp。 chesses[yy][xx]!=null amp。amp。 chesses[yy][xx].getChessesValue()==value) { count++。 xx。 yy++。 if(xx0||yychessMapGrid)break。 } xx=tempx+1。 yy=tempy1。 while(yy=0 amp。amp。 xxchessMapGrid amp。amp。 chesses[yy][xx]!=null amp。amp。 chesses[yy][xx].getChessesValue()==value) { count++。 xx++。 yy。 if(yy0||xxchessMapGrid)break。 } if(count == 5) return true。 /** * 正向?qū)蔷€ */ xx=tempx。 yy=tempy。//讓目前的值與傳入的值保持一致 count = 0。//用來計算當(dāng)前某一方的棋子是否夠五個 while(xxchessMapGrid amp。amp。 yychessMapGrid amp。amp。 chesses[yy][xx]!=null amp。amp。 chesses[yy][xx].getChessesValue()==value) { count++。 xx++。 yy++。 if(xxchessMapGrid||yychessMapGrid)break。 } xx=tempx1。 yy=tempy1。 while(yy=0 amp。amp。 xx=0 amp。amp。 chesses[yy][xx]!=null amp。amp。 chesses[yy][xx].getChessesValue()==value) { count++。 xx。 yy。 if(xx0||yy0)break。 } if(count == 5) return true。 return false。 }因為該版本的游戲是單機挑戰(zhàn)版的,所以肯定是人和手機對戰(zhàn),如果人下了一個棋子的話,手機就會自動下一個棋子的,下面的方法是電腦根據(jù)人下的棋子進行判斷,如果人下的棋子在橫或者縱或者正對角線或者反對角線上已經(jīng)或者是超過了三個棋子的話,那已經(jīng)構(gòu)成了威脅,需要堵住對方的棋子,否則手機隨機的在棋盤上沒有旗子的地方下一個棋子。程序如下:private int[] checkChesses(int x,int y,int chessesValue){ int[]temp = {0,0}。//存放要走的棋子的位置,temp[0]存放x坐標,temp[1]存放y坐標 int value = chessesValue。 int xx = x。//循環(huán)變量的值 int yy = y。//循環(huán)變量的值 int tempx=x,tempy=y。//存儲當(dāng)前傳入的值,便于以后從這個點開始進行判斷 int pointX1=0,pointX2=0,pointY1=0,pointY2=0。//用來存放判斷是否已經(jīng)構(gòu)成威脅的位置坐標 /** * 縱向判斷 */ xx=tempx。 yy=tempy。//讓目前的值與傳入的值保持一致 int count = 0。//用來計算當(dāng)前某一方的棋子是否夠五個 while(yy=0 amp。amp。 chesses[yy][xx]!=null amp。amp。 chesses[yy][xx].getChessesValue()==value) { count++。 yy。 if(yy0)break。 } pointY1=yy。 yy=tempy+1。 while(yychessMapGrid amp。amp。 chesses[yy][xx]!=null amp。amp。 chesses[yy][xx].getChessesValue()==value) { count++。 yy++。 if(yychessMapGrid)break。 } pointY2=yy。 if(count = chessesNum amp。amp。 chesses[pointY1][xx]==null amp。amp。 pointY1=0) { temp[0]=xx。 temp[1]=pointY1。 return temp。 }else if(count = chessesNum amp。amp。 chesses[pointY2][xx]==null amp。amp。 pointY2=chessMapGrid) { temp[0]=xx。 temp[1]=pointY2。 return temp。 } /** * 橫向判斷 */ xx=tempx。 yy=tempy。//讓目前的值與傳入的值保持一致 count = 0。//用來計算當(dāng)前某一方的棋子是否夠五個 while(xx=0 amp。amp。 chesses[yy][xx]!=null amp。amp。 chesses[yy][xx].getChessesValue()==value) { count++。 xx。 if(xx0)break。 } pointX1=xx。 xx=tempx+1。 while(xxchessMapGrid amp。amp。 chesses[yy][xx]!=null amp。amp。 chesses[yy][xx].getChessesValue()==value) { count++。 xx++。 if(xxchessMapGrid)break。 } pointX2=xx。 if(count = chessesNum amp。amp。 chesses[yy][pointX1]==null amp。amp。 pointX1=0) { temp[0]=pointX1。 temp[1]=yy。 return temp。 }else if(count = chessesNum amp。amp。 chesses[yy][pointX2]==null amp。amp。 pointX2=chessMapGrid) { temp[0]=pointX2。 temp[1]=yy。 return temp。 } xx=tempx。 yy=tempy。//讓目前的值與傳入的值保持一致 count = 0。//用來計算當(dāng)前某一方的棋子是否夠五個 while(xx=0 amp。amp。 yychessMapGrid amp。amp。 chesses[yy][xx]!=null amp。amp。 chesses[yy][xx].getChessesValue()==value) { count++。 xx。 yy++。 if(xx0||yychessMapGrid)break。 } pointX1 = xx。 pointY1 = yy。 xx=tempx+1。 yy=tempy1。 while(yy=0 amp。amp。 xxchessMapGrid amp。amp。 chesses[yy][xx]!=null amp。amp。 chesses[yy][xx].getChessesValue()==value) { count++。 xx++。
點擊復(fù)制文檔內(nèi)容
研究報告相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1