国产乱人视频免费观看网站,九九精品视频在线观看,九九久re8在线精品视频,日韩久久精品五月综合

<menu id="zjelp"></menu>

    <th id="zjelp"><tbody id="zjelp"><form id="zjelp"></form></tbody></th>
    <small id="zjelp"><menuitem id="zjelp"></menuitem></small>
  • <small id="zjelp"></small>

    <address id="zjelp"></address>
    <address id="zjelp"></address>
    C編寫的“掃雷”源程序

    C編寫的“掃雷”源程序

    ID:43324066

    大?。?9.00 KB

    頁數(shù):9頁

    時(shí)間:2019-09-30

    C編寫的“掃雷”源程序_第1頁
    C編寫的“掃雷”源程序_第2頁
    C編寫的“掃雷”源程序_第3頁
    C編寫的“掃雷”源程序_第4頁
    C編寫的“掃雷”源程序_第5頁
    資源描述:

    《C編寫的“掃雷”源程序》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在工程資料-天天文庫。

    1、//headerfile#include#inelude#inelude#inelude#ineludevconio.h>//defines#defineKEY_UP0xE048#defineKEY_DOWN0xE050#defineKEY_LEFT0xE04B#defineKEY_RIGHT0xE04D#defineKEY_ESCOxOOlB#defineKEY_1*1'#defineKEY_22#defineKEY_33#defineGAMEMAXWIDTH100#defineGAME_MA

    2、X_HEIGHT100//StringsResource#defineSTR_GAMETITLEHArrowKey:MoveCursorKeyl:OpenKey2:MarkKey3:OpenNeighborsH#defineSTR_GAMEWIN"Congratulations!YouWin!Thankyouforplaying!"#defineSTR_GAMEOVER"GameOver,thankyouforplaying!"#defineSTR_GAMEEND"Presentedbyyzfy.PressESCtoexit"http:////Baseclassc

    3、lassCConsoleWnd{public:staticintTextOut(constchar*);staticintGotoXY(intzint);staticintCharOut(int,int,constint);staticintTextOutfint,int,constchar*);staticintGetKey();public:};//{{//classCConsoleWnd////intCConsoleWnd::GetKey()//WaitforstandardinputandreturntheKeyCode//intCConsoleWnd::Ge

    4、tKey()intnkey=getch(),nk=O;if(nkey>=12811nkey==O)nk=getch();returnnk>0?nkey*256+nk:nkey;}////intCConsoleWnd::GotoXY(intx,inty)//Movecursorto(x,y)//OnlyConsoleApplication//intCConsoleWnd::GotoXY(intx,inty){COORDcd;cd.X=x;cd.Y=y;returnSetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDL

    5、E),cd);}////intCConsoleWnd::TextOut(constchar*pstr)//Outputastringatcurrentposition//intCConsoleWnd::TextOut(constchar*pstr){for(;*pstr;++pstr)putchar(*pstr);return0;}////intCConsoleWnd::CharOut(intx,inty,constintpstr)//Outputacharat(x,y)//intCConsoleWnd::CharOut(intx,inty,constintpstr)

    6、{GotoXY(x,y);returnputchar(pstr);}////intCConsoleWnd::TextOut(constchar*pstr)//Outputastringat(x,y)//intCConsoleWnd::TextOut(intx,inty,constchar*pstr){GotoXY(x,y);returnTextOut(pstr);}//}}////ApplicationclassclassCSLGame:publicCConsoleWndprivate:private:intcurX,curY;intpoolWidth,poolHei

    7、ght;intbm_gamepool[GAME_MAX_HEIGHT+2][GAME_MAX_WIDTH+2];public:CSLGame():curX(0)zcurY(0){poolWidth=poolHeight=0;}intlnitPool(int,int,int);intMoveCursor(){returnCConsoleWnd::GotoXY(curX,curY);}intDrawPool(int);intWaitMessagef);intGetShowNum(int,int);intTryOpen(int,int);private:i

    當(dāng)前文檔最多預(yù)覽五頁,下載文檔查看全文

    此文檔下載收益歸作者所有

    當(dāng)前文檔最多預(yù)覽五頁,下載文檔查看全文
    溫馨提示:
    1. 部分包含數(shù)學(xué)公式或PPT動(dòng)畫的文件,查看預(yù)覽時(shí)可能會(huì)顯示錯(cuò)亂或異常,文件下載后無此問題,請(qǐng)放心下載。
    2. 本文檔由用戶上傳,版權(quán)歸屬用戶,天天文庫負(fù)責(zé)整理代發(fā)布。如果您對(duì)本文檔版權(quán)有爭(zhēng)議請(qǐng)及時(shí)聯(lián)系客服。
    3. 下載前請(qǐng)仔細(xì)閱讀文檔內(nèi)容,確認(rèn)文檔內(nèi)容符合您的需求后進(jìn)行下載,若出現(xiàn)內(nèi)容與標(biāo)題不符可向本站投訴處理。
    4. 下載文檔時(shí)可能由于網(wǎng)絡(luò)波動(dòng)等原因無法下載或下載錯(cuò)誤,付費(fèi)完成后未能成功下載的用戶請(qǐng)聯(lián)系客服處理。