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

正文內容

基于mfc的對戰(zhàn)象棋設計與實現_畢業(yè)論文(參考版)

2024-09-02 13:40本頁面
  

【正文】 if (nChessinfo[15].type!=6) { MessageBox(黑方獲勝。 (str)。 //listbox 顯示 CString str。 PrintAll()。 nChessinfo[choosed].y=Marry[top][7]。 } //把棋譜的 map[OldX][OldY] 變 空 map[OldX][OldY]=14。 Marry[top][7]=int ()/CHESS_SIZE。 Marry[top][5]=nChessinfo[Search(,)].type。 Marry[top][3]=OldY。 Marry[top][1]=OldType。amp。 void CChess_mView::OnLButtonUp(UINT nFlags, CPoint point) { [choosed].type=OldType。 } ( 2) LButtonMove 操作 為了美觀, LButtonMove 操作需要做的就是選中的棋子跟著鼠標移動,主要要用到雙淮陰師范學院畢業(yè)論文(設計) 28 緩沖技術,這個在關鍵技術那部分做詳細介紹。 down_move=1。 [choosed].type=15。[OldX][OldY]6) { choosed=(,)。 } } if(==1) //黑方 { if([OldX][OldY]14amp。 [choosed].type=15。[OldX][OldY]6))) { if (==0)//紅方 { if ([OldX][OldY]=6) { choosed=(,)。([OldX][OldY]14amp。[OldX][OldY]=0)||(==1 amp。[OldX][OldY]=6 amp。 if ((==0amp。(=BOARD_EDGE)) { OldX=()/CHESS_SIZE。(=BOARD_HEIGHTBOARD_EDGE)amp。(=BOARD_EDGE) amp。 void CChess_mView::OnLButtonDown(UINT nFlags, CPoint point) { if (==) { if ((=BOARD_EDGE+CHESS_SIZE*9)amp。移動棋子到達目的地時,要判斷棋子是否能到達這里,即調用 CanGoTo()和 ShuaiCanGoTo()函數,若可以則讓該棋子落在此處。 } } 功能 走棋 走棋 功能包括三個部分,第一是選棋子,第二是移動棋子,第三是選擇目的地。(0==Old_Point_yNow_Point_y)) { return true。 } else if((abs(Old_Point_xNow_Point_x)==1)amp。amp。amp。 } else return false。amp。amp。 } else return false。amp。(Now_Point_yOld_Point_y==1)) { return true。(Old_Point_y=9)) { if ((Old_Point_x==Now_Point_x)amp。 } //已過河 else if ((Old_Point_y=5)amp。(Now_Point_yOld_Point_y==1)) { return true。(Old_Point_y=4)) { if ((Old_Point_x==Now_Point_x)amp。 //黑卒 if (chesstype==7) { //未過河 if ((Old_Point_y=3)amp。如黑卒 ,未過河前, X 前后不變, Y 比之前多 1, 可 達。 過河以后 , 允許左右移動 。 } else return false。(14!=map[Now_Point_x][Now_Point_y])) return true。 else if((3==n)amp。i++) { if(14!=map[i][Old_Point_y]) n++。 淮陰師范學院畢業(yè)論文(設計) 25 for (int i=minrow。 int minrow=(Old_Point_xNow_Point_x)?Now_Point_x:Old_Point_x。 else return false。amp。 } //無子,可以放置 if(1==n) return true。i=maxcol。 int n=0。 //炮 if (1==chesstype||8==chesstype) { //同一列 if (Old_Point_x==Now_Point_x) { int maxcol=(Old_Point_yNow_Point_y)?Old_Point_y:Now_Point_y。 } 炮( 砲 ) 炮不僅可以和車一樣直走多步,還可以跳子吃子。 else return false。amp。amp。 淮陰師范學院畢業(yè)論文(設計) 24 int col=abs(Now_Point_xOld_Point_x)。amp。amp。amp。 } else return false。0==col)) return true。1==col)||(1==rowamp。 if((0==rowamp。(Now_Point_y=2)) { int row=abs(Now_Point_yOld_Point_y)。(Now_Point_y=0)amp。(Now_Point_x=5)amp。 //黑將 if (13==chesstype) { if ((Now_Point_x=3)amp。 } 帥(將) 帥或者將只能在自己的 九宮內 左右上下走一格。 } else return false。amp。 int col=abs(Now_Point_xOld_Point_x)。amp。amp。amp。 } else return false。(row==1)) { return true。 if ((0==rowcol)amp。(Now_Point_y=2)) { int row=abs(Now_Point_yOld_Point_y)。(Now_Point_y=0)amp。(Now_Point_x=5)amp。 //黑士 if (chesstype==12) { if ((Now_Point_x=3)amp。 } else return false。amp。amp。(14==map[Old_Point_x+1][Old_Point_y1])) { return true。(2==col)amp。 } else if((2==row)amp。amp。amp。(14==map[Old_Point_x1][Old_Point_y1])) { return true。(2==col)amp。 //田字范圍 if ((2==row)amp。(Now_Point_y=9)) { int row=Now_Point_xOld_Point_x。 } //紅象 else if(4==chesstype) { 淮陰師范學院畢業(yè)論文(設計) 22 if ((Now_Point_y=5)amp。 } else return false。amp。amp。(14==map[Old_Point_x+1][Old_Point_y1])) { return true。(2==col)amp。 } else if((2==row)amp。amp。amp。(14==map[Old_Point_x1][Old_Point_y1])) { return true。(2==col)amp。 //田字范圍 if ((2==row)amp。(Now_Point_y=4)) { int row=Now_Point_xOld_Point_x。 //黑象 if (11==chesstype) { if((Now_Point_y=0)amp。 } 相(象) 相 和 象 活動范圍不同,所以要分開判斷。 淮陰師范學院畢業(yè)論文(設計) 21 else return false。 else return false。 else return false。 else return false。(2!=row*col)) return false。 //日字的范圍 if((2!=row*col)amp。 //馬 if (3==chesstype||10==chesstype) { int row=Now_Point_xOld_Point_x。 淮陰師范學院畢業(yè)論文(設計) 20 } } 馬 馬 走日,所以要判斷始末位置的 X和 Y的差值的乘積是不是 2或者 2。(14!=map[Now_Point_x][Now_Point_y])) return true。 else if((2==n)amp。i++) { if(14!=map[Old_Point_x][i]) n++。 for(int i=minrow。 int minrow=(Old_Point_yNow_Point_y)?Now_Point_y:Old_Point_y。 else return false。amp。 } if(1==n) return true。i=maxcol。 int n=0。 //車 if (9==chesstype||2==chesstype) { //同一行 if (Old_Point_y==Now_Point_y) { int maxcol=(Old_Point_xNow_Point_x)?Old_Point_x:Now_Point_x。若只有一個,則表示目標位置沒有棋子,可以直達。 淮陰師范學院畢業(yè)論文(設計) 19 車 車只要中 間沒有棋子阻礙,可以到達它橫豎線所在的任何地方。 首先,不管是什么棋子,都不能吃自己一方的棋子。 這里主要介紹各個棋子的程序具體實現。 endif protected: //{{AFX_MSG(CChess_mView) ????? .(省略 ) //}}AFX_MSG DECLARE_MESSAGE_MAP() }。 virtual void Dump(CDumpContextamp。 //}}AFX_VIRTUAL // Implementation public: virtual ~CChess_mView()。 virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo)。 cs)。//給棋盤棋子賦值 // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CChess_mView) 淮陰師范學院畢業(yè)論文(設計) 18 public: virtual void OnDraw(CDC* pDC)。//用于網絡動棋子的時候整體刷新 HBITMAP LoadFileBmp(CString filePath)。 //把界面存儲于 buffer 中 void PrintAllMsg()。 //新游戲 void TextOutTop()。//發(fā)送聊天信息 //函數定義 void InitData()。//還原 void OnRenShu()。//開始 void OnGoBack()。 //用于鼠標彈上時的控制 int goback_huanyuan。//用于聊天的 edit int down_move。 //認輸按鈕 CButton m_send。 //悔棋按鈕 CButton m_hua
點擊復制文檔內容
高考資料相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1