高階軟體工程第九次作業----------團隊作業6◆◆◆◆◆◆IP、IC、IQ卡團隊Beta Sprint2
阿新 • • 發佈:2018-12-09
Beta Sprint 2
1. 會議照:
2. Beta daily task 2:
成員 | 昨天的工作 | 今天的工作 | 遇到的問題 |
吳忠粱 | 方塊移動與方塊變換優化1 | 優化Game UI1 |
暫無 |
楊德明 | 方塊移動與方塊變換優化2 | 優化Game UI2 | 遊戲視窗無法設定到螢幕中央 |
張志勇 | 方塊移動與方塊變換優化3 | 優化Game UI3 | 暫無 |
3. Burn down chart:
4. Code/Document Check-in 記錄已上傳至 Coding 地址 https://coding.net/u/godbee/p/LastHomework/git
5. 專案程式執行截圖:
// 函式: 初始化窗體的位置和大小VOID InitWndPostionSize(HWND hWnd) { RECT rect; int nWinX, nWinY, nClientX, nClientY; //獲取視窗大小 GetWindowRect(hWnd, &rect); nWinX = rect.right - rect.left; nWinY = rect.bottom - rect.top; //獲取客戶區大小 GetClientRect(hWnd, &rect); nClientX = rect.right - rect.left; nClientY = rect.bottom - rect.top; // 獲取當前螢幕的寬高,將視窗放置中心區域 UINT iScreenX = GetSystemMetrics(SM_CXSCREEN); UINT iScreenY = GetSystemMetrics(SM_CYSCREEN); // 調整視窗位置與大小 MoveWindow(hWnd, (iScreenX - PAINT_WIDTH)/2, (iScreenY - PAINT_HEIGHT)/3, PAINT_WIDTH + nWinX - nClientX, PAINT_HEIGHT + nWinY - nClientY, true); } // 函式: 繪製背景 VOID DrawBackGround(HDC hdc) { HPEN hPenNull = (HPEN)GetStockObject(NULL_PEN); // HPEN NULL HBRUSH hBrushGray = (HBRUSH)GetStockObject(GRAY_BRUSH); // hBRUSH GRAY SelectObject(hdc,hPenNull); SelectObject(hdc, hBrushGray); // 背景顏色 // 遊戲區域大小 (HDC,左上角X,左上角Y,右下角X,右下角Y) Rectangle(hdc, GAME_POSITION.iLeftX, GAME_POSITION.iLeftY, GAME_POSITION.iRightX, GAME_POSITION.iRightY); // 資訊區大小 Rectangle(hdc, INFO_POSITION.iLeftX, INFO_POSITION.iLeftY, INFO_POSITION.iRightX, INFO_POSITION.iRightY); DeleteObject(hBrushGray); DeleteObject(hPenNull); } // 函式: 繪製資訊欄 VOID DrawInfo(HDC hdc) { // 下一個下落方塊 RECT rect; HFONT hFont = CreateFont(23, 0, 0, 0, FW_THIN, 0, 0, 0, UNICODE, 0, 0, 0, 0, L"微軟雅黑"); SelectObject(hdc, hFont); SetBkMode(hdc, TRANSPARENT); SetBkColor(hdc, RGB(255,255,0)); NEXT_FONT_POSITION.setRect(rect); DrawText(hdc, TEXT("下一個"), _tcslen(TEXT("下一個")), &rect , 0); LEVEL_FONT_POSITION.setRect(rect); TCHAR tcDif[10]; LPCTSTR lpctDif = TEXT("難度: %d"); wsprintf(tcDif, lpctDif , iCurDif); DrawText(hdc, tcDif, _tcslen(tcDif), &rect , 0); SCORE_FONT_POSITION.setRect(rect); TCHAR tcScore[10]; LPCTSTR lpctScore = TEXT("得分: %d"); wsprintf(tcScore, lpctScore, iCurScore); DrawText(hdc, tcScore, _tcslen(tcScore), &rect , 0); DeleteObject(hFont); }
附圖: