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

正文內容

五子棋游戲程序設計與開發(fā)(存儲版)

2025-01-15 01:33上一頁面

下一頁面
  

【正文】 er1,2 。amp。 t true。 else if count%2 0 amp。 hInstance,hwnd 1 TextOut hdc,95,510,黑方選手勝利 下輪白方先手 ,26 。 SetTextColor hdc,RGB 0,0,0 。 0。//iMode 的值為 OPAQUE 文字矩形覆蓋背景 或 TRANSPARENT 文字背景透明 SetTextColor hdc,RGB rand %356,rand %256,rand %156 。 0。 //一方勝利后結束本局 if CtrlS PlaySound TEXT Sound\\ ,NULL,SND_FILENAME|SND_ASYNC 。amp。i++ for j 0。 //創(chuàng)建 bufferDC 在內存中加載數(shù)據(jù)后在顯示到屏幕,解決了屏幕閃爍問題 hBitmap2 CreateCompatibleBitmap hdc,cxSource+263,cySource+110 。 if over 2 amp。 j int floor double M32 / 22 。 else if [i][j].GetTag 1 //不為空白就不能在此處下棋 return 0。 if t //實現(xiàn)黑白子循環(huán) t ture 為黑子先手 [i][j].setcolor 1 。 M 16+22*17 amp。bitmap 。 break。 case ID_SOUND: if CtrlS CtrlS false。 //得到棋子的縱坐標值 [m][n].tag 0。 break。 break。 //刷新窗口 over 2。 //over 1。 std::list ::iterator iter。 BITMAP bitmap。 //設置二為數(shù)組 xArray,按順序記錄每一步棋子落點的二位數(shù)組坐標,用來在悔棋后初始化此落點的信息 int count 0。 if !hWnd return FALSE 。 HBRUSH GetStockObject WHITE_BRUSH 。 BOOL InitApplication HINSTANCE hInstance WNDCLASS wndclass。 while GetMessage amp。 //主窗口過程聲明 BOOL CALLBACK About HWND hDig,UINT message,WPARAM wParam,LPARAM lPamam 。amp。 chessboard[i3][j+3].color 1 amp。 ++i for j 0。amp。 chessboard[i+2][j+2].color 1 amp。 ////正對角線方向判斷勝利 //// for i 0。amp。 chessboard[i+1][j].color 1 amp。amp。 chessboard[i][j+4].color 1 return 1。 ++j if chessboard[i][j].color 1 amp。 ///判斷勝負算法 int ChessBoard::Judge HINSTANCE amp。 endif define IDI_ICON1 101 define IDR_MENU1 102 define IDD_DIALOG1 103 define IDD_DIALOG2 104 define IDD_DIALOG3 105 define IDD_DIALOG4 106 define IDR_ACCELERATOR1 107 define IDB_BITMAP1 111 define IDB_BITMAP2 115 define IDB_BITMAP3 116 define IDC_BName 118 define IDC_EDIT1 define IDC_EDIT2 define IDC_EDIT3 define ID_MENUITEM40001 40001 define ID_MSINGER 40001 define ID_MENUITEM40002 40002 define ID_MDOUBLE 40002 define ID_MENUITEM40003 40003 define ID_MRESTART 40003 define ID_MENUITEM40004 40004 define ID_MEXIT 40004 define ID_MENUITEM40005 40005 define ID_MHOUJUE 40005 define ID_MENUITEM40006 40006 define ID_MHELP 40006 define ID_MREPEN 40007 define ID_MREPENT 40007 define ID_MBACKCOLOR 40008 define IDM_MDOUBLE 40009 define ID_MABOUT 40011 define ID_MRESET 40012 define ID_TEXT 40019 define ID_MMUSI // Next default values for new object ifdef APSTUDIO_INVOKED ifndef APSTUDIO_READONLY_SYMBOLS define _APS_NEXT_RESOURCE_VALUE 116 define _APS_NEXT_COMMAND_VALUE 40013 define _APS_NEXT_CONTROL_VALUE 1006 define _APS_NEXT_SYMED_VALUE 101 endif endif 附錄 B 源文件代碼 : include include void ChessBoard::Init //棋盤初始化 for int i 0。 class ChessBoard public: void Init 。 附 錄 附錄 A 頭文件代碼 : ifndef CHESSBOARD_H define CHESSBOARD_H include struct Chess POINT seat。 參考文獻 [1] 微軟公司 . MSDN Library Visual Studio [M].美國: Mirosoft Company, 1998. [2] Charles 程序設計 [M].北京:北京大學出版社, 2021. [3] Bruce in C++[M].北京:機械工業(yè)出版社, . [4] Nicolai al C++標準程序庫 [M].湖北:華中科技大學出版社, . [5] 侯俊杰 . 深入淺出 MFC 第 2 版 [M].湖北:華中科技大學出版社, 1999. [6] 侯捷致 謝 感謝我的父母,沒有您們的包容和支持,就不會有我的今天。一個項目從整體構思,到詳細設計。在單元測試中可以采用功能性 測試和結構性測試兩種。 其中, cxSource 與 cySource 是整張圖片在加載時用 GetObject 方法取得的長度與寬度的尺寸信息。hwnd 。 ++i for int j 0。 HWND hWnd。j++ for iter InitChessBn 。 //push_back 將棋子信息存入 List 鏈表中的最后一個 if px 255 //將二維數(shù)組坐標值 i 和 j 存入 xArray 數(shù)組中, xArray[px][0] i。至此,勝負判斷已完畢。在棋盤類中我們同時還定義了 List 鏈表,勝負判斷方法,棋盤初始化方法等內容。 歡樂五子棋程序最初是在 Win32 應用程序項目建立,以 Windows 消息與 API函數(shù)實現(xiàn)簡單 Window 窗體點擊鼠標畫圓圈的基礎上一步步完善,改進現(xiàn)在的五子棋游戲,在架構設計上參考了 Abstract Factory(抽象工廠)模式,以實現(xiàn)對兩個不同模塊進行一般化的控制。按照這個思路,我們將五子棋棋盤添加到窗體上,將鼠標光標換為棋子,將棋盤進行必要的初始化,對棋子進行實例化,即可實現(xiàn)五子棋的基本程序。 //鼠標坐標 y InvalidateRect hWnd,NULL,1 。依 據(jù)以上因素,本開發(fā)項目不僅方便快捷、高效,而且效益比較好,從而使本開發(fā)者相信該系統(tǒng)開發(fā)出來之后將取得的成功。 2 系統(tǒng)分析 可行性分析 技術可行性 一個完的具有以下優(yōu)越性:經(jīng)濟可行性主要依據(jù)是成本 /效益分析,該的目標是以最低的成本,在 最短的期限內開發(fā)。”李善注引三國魏邯鄲淳《藝經(jīng)》中曰:“棋局,縱橫各十七道,合二百八十九道,白黑棋子,各一百五十枚”。 關鍵詞:五 子棋;棋盤界面;游戲菜單;悔棋;初始化 Gobang game design and development process Abstract According to my courtyard is the C++ program about Gobang Game , designs a set to be imperative based on the puter technology windows program. The Gobang program include chessboard interface, Menu, can be to retract a false move in a chess game and Initialization . Including system analysis, system function design, contact surface and related code design. This system major function by means of C++ language, Write this discourse based on the Gobang program Game. Programming problems encountered in the process, there is how Othello child circulation, how to determine the oute, and how to undo, how to make the screen does not flicker in the game of chess and other issues, after my think better of and debug again and again, get hold of the disciplinarian of the problem, and according to the rules of Gobang, I put the axe in the helve with exert myself. I acplished all the basic functions consequently. Gobang game t
點擊復制文檔內容
研究報告相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1