亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? unit1.cpp

?? 自編小俄羅斯方塊
?? CPP
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
      //如果得分,則銷掉此行
      if (m_bIsSucced)
      {
        for (k=i;k>0;k--)
          for (j=0;j<m_iCol;j++)
            GameStatus[k][j] = GameStatus[k-1][j];
        //第1行清零
        for (j=0;j<m_iCol;j++)
          GameStatus[0][j]=0;

        m_iMuch += 1;
      }
    }

    if (m_iMuch>0)
    {
      m_iPerformance += m_iMuch * m_iMuch * 100;
      //刷新游戲區(qū)域
      TRect rect1(m_iStartY, m_iStartX, m_iStartY+300, m_iStartX+360);
      InvalidateRect(Handle,&rect1,false);

      //刷新分?jǐn)?shù)區(qū)域
      TRect rect2(m_iStartY+320, m_iStartX+180, m_iStartY+440, m_iStartX+200);
      InvalidateRect(Handle,&rect2,false);
    }
  }
}
//---------------------------------------------------------------------------
/* * * * * * * * * * * * * * * * * * * * * *
* 內(nèi)部函數(shù):方塊是否還可以左移
* * * * * * * * * * * * * * * * * * * * * */
BOOL TForm1::LeftIsLimit()
{
  int x1,x2,x3,x4,y1,y2,y3,y4;
  x1 = ActiveStatus[0][0];
  x2 = ActiveStatus[1][0];
  x3 = ActiveStatus[2][0];
  x4 = ActiveStatus[3][0];
  y1 = ActiveStatus[0][1];
  y2 = ActiveStatus[1][1];
  y3 = ActiveStatus[2][1];
  y4 = ActiveStatus[3][1];

  switch(m_currentRect)
  {
  case 1:
    if (GameStatus[x1][y1-1] || GameStatus[x2][y2-1] || GameStatus[x3][y3-1] || GameStatus[x4][y4-1])
            return FALSE;
    break;
  case 11:
    if (GameStatus[x1][y1-1])
            return FALSE;
    break;
  case 2:
    if (GameStatus[x1][y1-1] || GameStatus[x2][y2-1])
            return FALSE;
    break;
  case 3:
    if (GameStatus[x1][y1-1] || GameStatus[x2][y2-1])
            return FALSE;
    break;
  case 31:
    if (GameStatus[x1][y1-1] || GameStatus[x2][y2-1] || GameStatus[x3][y3-1])
            return FALSE;
    break;
  case 32:
    if (GameStatus[x1][y1-1] || GameStatus[x3][y3-1])
            return FALSE;
    break;
  case 33:
    if (GameStatus[x1][y1-1] || GameStatus[x2][y2-1] || GameStatus[x4][y4-1])
            return FALSE;
    break;
  case 4:
    if (GameStatus[x1][y1-1] || GameStatus[x2][y2-1] || GameStatus[x4][y4-1])
            return FALSE;
    break;
  case 41:
    if (GameStatus[x1][y1-1] || GameStatus[x2][y2-1])
            return FALSE;
    break;
  case 5:
    if (GameStatus[x1][y1-1] || GameStatus[x2][y2-1] || GameStatus[x3][y3-1])
            return FALSE;
    break;
  case 51:
    if (GameStatus[x1][y1-1] || GameStatus[x3][y3-1])
            return FALSE;
    break;
  case 6:
    if (GameStatus[x1][y1-1] || GameStatus[x3][y3-1] || GameStatus[x4][y4-1])
            return FALSE;
    break;
  case 61:
    if (GameStatus[x1][y1-1] || GameStatus[x2][y2-1])
            return FALSE;
    break;
  case 62:
    if (GameStatus[x1][y1-1] || GameStatus[x2][y2-1] || GameStatus[x3][y3-1])
            return FALSE;
    break;
  case 63:
    if (GameStatus[x1][y1-1] || GameStatus[x3][y3-1])
            return FALSE;
    break;
  case 7:
    if (GameStatus[x1][y1-1] || GameStatus[x2][y2-1] || GameStatus[x3][y3-1])
            return FALSE;
    break;
  case 71:
    if (GameStatus[x1][y1-1] || GameStatus[x2][y2-1])
            return FALSE;
    break;
  case 72:
    if (GameStatus[x1][y1-1] || GameStatus[x2][y2-1] || GameStatus[x3][y3-1])
            return FALSE;
    break;
  case 73:
    if (GameStatus[x1][y1-1] || GameStatus[x4][y4-1])
            return FALSE;
    break;
  }

  return TRUE;
}
//---------------------------------------------------------------------------
/* * * * * * * * * * * * * * * * * * * * * *
* 內(nèi)部函數(shù):方塊是否還可以右移
* * * * * * * * * * * * * * * * * * * * * */
BOOL TForm1::RightIsLimit()
{

  int x1,x2,x3,x4,y1,y2,y3,y4;
  x1 = ActiveStatus[0][0];
  x2 = ActiveStatus[1][0];
  x3 = ActiveStatus[2][0];
  x4 = ActiveStatus[3][0];
  y1 = ActiveStatus[0][1];
  y2 = ActiveStatus[1][1];
  y3 = ActiveStatus[2][1];
  y4 = ActiveStatus[3][1];

  switch(m_currentRect)
  {
  case 1:
    if (GameStatus[x1][y1+1] || GameStatus[x2][y2+1] || GameStatus[x3][y3+1] || GameStatus[x4][y4+1])
            return FALSE;
    break;
  case 11:
    if (GameStatus[x4][y4+1])
            return FALSE;
    break;
  case 2:
    if (GameStatus[x3][y3+1] || GameStatus[x4][y4+1])
            return FALSE;
    break;
  case 3:
    if (GameStatus[x2][y2+1] || GameStatus[x4][y4+1])
            return FALSE;
    break;
  case 31:
    if (GameStatus[x1][y1+1] || GameStatus[x3][y3+1] || GameStatus[x4][y4+1])
            return FALSE;
    break;
  case 32:
    if (GameStatus[x3][y3+1] || GameStatus[x4][y4+1])
            return FALSE;
    break;
  case 33:
    if (GameStatus[x2][y2+1] || GameStatus[x3][y3+1] || GameStatus[x4][y4+1])
            return FALSE;
    break;
  case 4:
    if (GameStatus[x1][y1+1] || GameStatus[x3][y3+1] || GameStatus[x4][y4+1])
            return FALSE;
    break;
  case 41:
    if (GameStatus[x3][y3+1] || GameStatus[x4][y4+1])
            return FALSE;
    break;
  case 5:
    if (GameStatus[x2][y2+1] || GameStatus[x3][y3+1] || GameStatus[x4][y4+1])
            return FALSE;
    break;
  case 51:
    if (GameStatus[x2][y2+1] || GameStatus[x4][y4+1])
            return FALSE;
    break;
  case 6:
    if (GameStatus[x2][y2+1] || GameStatus[x3][y3+1] || GameStatus[x4][y4+1])
            return FALSE;
    break;
  case 61:
    if (GameStatus[x2][y2+1] || GameStatus[x4][y4+1])
            return FALSE;
    break;
  case 62:
    if (GameStatus[x1][y1+1] || GameStatus[x2][y2+1] || GameStatus[x4][y4+1])
            return FALSE;
    break;
  case 63:
    if (GameStatus[x3][y3+1] || GameStatus[x4][y4+1])
            return FALSE;
    break;
  case 7:
    if (GameStatus[x2][y2+1] || GameStatus[x3][y3+1] || GameStatus[x4][y4+1])
            return FALSE;
    break;
  case 71:
    if (GameStatus[x1][y1+1] || GameStatus[x4][y4+1])
            return FALSE;
    break;
  case 72:
    if (GameStatus[x2][y2+1] || GameStatus[x3][y3+1] || GameStatus[x4][y4+1])
            return FALSE;
    break;
  case 73:
    if (GameStatus[x3][y3+1] || GameStatus[x4][y4+1])
            return FALSE;
    break;
  }

  return TRUE;
}
//---------------------------------------------------------------------------
/* * * * * * * * * * * * * * * * * * * * * *
* 內(nèi)部函數(shù):方塊的變形
* * * * * * * * * * * * * * * * * * * * * */
void TForm1::RectChange()
{
  //先預(yù)先變形,然后判斷變形后的方塊是否有空間,
  //如有足夠空間,則進(jìn)行實(shí)際變形,否則不變
  int xx1,xx2,xx3,xx4,yy1,yy2,yy3,yy4;
  int m_lscurrentRect;

  AnsiString lsStr;

  int x1,x2,x3,x4,y1,y2,y3,y4;
  x1 = ActiveStatus[0][0];
  x2 = ActiveStatus[1][0];
  x3 = ActiveStatus[2][0];
  x4 = ActiveStatus[3][0];
  y1 = ActiveStatus[0][1];
  y2 = ActiveStatus[1][1];
  y3 = ActiveStatus[2][1];
  y4 = ActiveStatus[3][1];

  //變形后位置在數(shù)組中的存放順序仍需遵循先左后右,在同一列中先上后下
  xx1=x1; xx2=x2; xx3=x3; xx4=x4; yy1=y1; yy2=y2; yy3=y3; yy4=y4;
  switch(m_currentRect)
  {
  case 1:
    xx1=x1+1; yy1=y1-1; xx3=x3-1; yy3=y3+1; xx4=x4-2; yy4=y4+2;
    m_lscurrentRect = 11;
    break;
  case 11:
    xx1=x1-1; yy1=y1+1; xx3=x3+1; yy3=y3-1; xx4=x4+2; yy4=y4-2;
    m_lscurrentRect = 1;
    break;
  case 2:
      m_lscurrentRect=2;
      break;
  case 3:
    xx1=x1-2; yy1=y1+1; xx4=x4-1; yy4=y4;
    m_lscurrentRect = 31;
    break;
  case 31:
    xx1=x1+1; yy1=y1-1;
    m_lscurrentRect = 32;
    break;
  case 32:
    xx1=x1+1; yy1=y1; xx4=x4+2; yy4=y4-1;
    m_lscurrentRect=33;
    break;
  case 33:
    xx4=x4-1; yy4=y4+1;
    m_lscurrentRect=3;
    break;
  case 4:
    xx1=x1+2; yy1=y1-1; xx3=x3+1; yy3=y3-1; xx4=x4-1;
    m_lscurrentRect = 41;
    break;
  case 41:
    xx1=x1-2; yy1=y1+1; xx3=x3-1; yy3=y3+1; xx4=x4+1;
    m_lscurrentRect = 4;
    break;
  case 5:
    xx1=x1-1; xx2=x2-2; yy2=y2+1; xx3=x3+1; yy4=y4+1;
    m_lscurrentRect = 51;
    break;
  case 51:
    xx1=x1+1; xx2=x2+2; yy2=y2-1; xx3=x3-1; yy4=y4-1;
    m_lscurrentRect = 5;
    break;
  case 6:
    xx2=x1+1; yy2=y2-1; xx3=x3-1; xx4=x4-2; yy4 = yy4+1;
    m_lscurrentRect = 61;
    break;
  case 61:
    xx3=x3+2; yy3=y3-1; xx4=x4+2; yy4=y4-1;
    m_lscurrentRect = 62;
    break;
  case 62:
    xx1=x1+1; yy1=y1-1; xx3=x3-2; yy3=y3+1; xx4=x4-1;
    m_lscurrentRect = 63;
    break;
  case 63:
    xx1=x1-2; yy1=y1+1; xx2=x2-2; yy2=y2+1;
    m_lscurrentRect = 6;
    break;
  case 7:
    xx3=x3-1; yy3=y3+1; xx4=x4+1; yy4=y4+1;
    m_lscurrentRect = 71;
    break;
  case 71:
    xx1=x1+2; xx2=x2-1; yy2=y2+1; xx4=x4+1; yy4=y4-1;
    m_lscurrentRect = 72;
    break;
  case 72:
    xx1=x1-2; xx3=x3-1; yy3=y3+1; xx4=x4-1; yy4=y4+1;
    m_lscurrentRect = 73;
    break;
  case 73:
    xx2=x2+1; yy2=y2-1; xx3=x3+2; yy3=y3-2; xx4=x4-1; yy4=y4-1;
    m_lscurrentRect = 7;
    break;
  }

  //如果變形后所在的區(qū)域內(nèi)無(wú)其他方塊,則表示有足夠空間,可以變形
  //且不能超越邊界
  GameStatus[x1][y1] = 0;
  GameStatus[x2][y2] = 0;
  GameStatus[x3][y3] = 0;
  GameStatus[x4][y4] = 0;
  if (GameStatus[xx1][yy1]==0 && GameStatus[xx2][yy2]==0 && GameStatus[xx3][yy3]==0 && GameStatus[xx4][yy4]==0
          && yy1>=0 && yy4<=m_iCol-1
          && !(xx1<0 || xx2<0 || xx3<0 || xx4<0)
          && !(xx1>m_iRow-1 || xx2>m_iRow-1 || xx3>m_iRow-1 || xx4>m_iRow-1) )
  {
    InvalidateCurrent();

    ActiveStatus[0][0]=xx1;
    ActiveStatus[1][0]=xx2;
    ActiveStatus[2][0]=xx3;
    ActiveStatus[3][0]=xx4;
    ActiveStatus[0][1]=yy1;
    ActiveStatus[1][1]=yy2;
    ActiveStatus[2][1]=yy3;
    ActiveStatus[3][1]=yy4;

    GameStatus[xx1][yy1] = 1;
    GameStatus[xx2][yy2] = 1;
    GameStatus[xx3][yy3] = 1;
    GameStatus[xx4][yy4] = 1;

    InvalidateCurrent();

    //改變形狀代碼
    m_currentRect = m_lscurrentRect;
  }
  else
  {
    GameStatus[x1][y1] = 1;
    GameStatus[x2][y2] = 1;
    GameStatus[x3][y3] = 1;
    GameStatus[x4][y4] = 1;
  }

  //判斷是否已到底
  ActiveIsBottom();
}
//---------------------------------------------------------------------------
/* * * * * * * * * * * * * * * * * * * * * *
* 內(nèi)部函數(shù):刷新當(dāng)前的區(qū)域
*
* 只刷新需要刷新的四個(gè)小方塊區(qū)域,防止屏幕抖動(dòng)情況發(fā)生
* * * * * * * * * * * * * * * * * * * * * */
void TForm1::InvalidateCurrent()
{
  int i;

  for (i=0;i<4;i++)
  {
    TRect rect(m_iStartX+ActiveStatus[i][1]*m_iLarge,  m_iStartY+ActiveStatus[i][0]*m_iLarge,
    m_iStartX+(ActiveStatus[i][1]+1)*m_iLarge+5,  m_iStartY+(ActiveStatus[i][0]+1)*m_iLarge);
    InvalidateRect(Handle,&rect,false);
  }
}
//---------------------------------------------------------------------------
//用于生成當(dāng)前區(qū)域大小與級(jí)別所對(duì)應(yīng)的漢字描述
void TForm1::CurrentAreaAndLevel()
{
  switch(m_iRow)
  {
  case 12:
    m_strArea = "12行10列";
    break;
  case 18:
    m_strArea = "18行15列";
    break;
  case 24:
    m_strArea = "24行20列";
    break;
  case 30:
    m_strArea = "30行25列";
    break;
  }

  switch(m_iLevel)
  {
  case 0:
    m_strLevel = "第一級(jí): 蝸牛級(jí)";
    break;
  case 1:
    m_strLevel = "第二級(jí): 笨鴨級(jí)";
    break;
  case 2:
    m_strLevel = "第三級(jí): 雄雞級(jí)";
    break;
  case 3:
    m_strLevel = "第四級(jí): 獵狗級(jí)";
    break;
  case 4:
    m_strLevel = "第五級(jí): 云豹級(jí)";
    break;
  case 5:
    m_strLevel = "第六級(jí): 飛鷹級(jí)";
    break;
  }
}
//---------------------------------------------------------------------------
//插放背景音樂(lè), 所有錯(cuò)誤忽略
void TForm1::PlayMid()
{
  char inBuf[300],outBuf[60],fileName[255];
  MCIERROR mciError;

  strcpy(fileName,"hwrect.mid");
  wsprintf( inBuf,"open %s type sequencer alias myseq",fileName);
  mciError = mciSendString( inBuf, outBuf, sizeof(outBuf), NULL);
  if (mciError == 0)
  {
    mciError = mciSendString("play myseq notify",NULL,0, Handle);
    if (mciError != 0)
      mciSendString("close myseq",NULL,0,NULL);
  }
}
//---------------------------------------------------------------------------
//終止插放背景音樂(lè)
void TForm1::StopMid()
{
  mciSendString("close myseq",NULL,0,NULL);
}
//---------------------------------------------------------------------------

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久奇米777| 久久久影视传媒| 韩国午夜理伦三级不卡影院| 日韩毛片一二三区| 国产精品久久久久久久久搜平片 | 久久精品国产99| 18成人在线视频| 日韩欧美一区二区不卡| 91九色最新地址| 成人三级在线视频| 国产一区中文字幕| 日韩成人一级大片| 一二三四区精品视频| 国产欧美一区在线| 亚洲精品一区二区三区四区高清| 欧美日韩三级在线| 色综合夜色一区| 成人av网站免费观看| 国产suv精品一区二区6| 激情综合色综合久久| 男男gaygay亚洲| 日韩专区一卡二卡| 亚洲成人一区在线| 亚洲伊人色欲综合网| 亚洲欧美综合网| 亚洲欧美综合色| 亚洲欧美综合色| 中文字幕综合网| 亚洲视频电影在线| 亚洲人精品午夜| 亚洲色欲色欲www| 亚洲人成人一区二区在线观看| 国产精品美女一区二区| 国产精品久久久久精k8| 国产精品乱人伦一区二区| 国产精品视频看| 国产精品成人一区二区艾草| 国产精品久久久久久久久搜平片 | 国产精品美日韩| 亚洲高清视频的网址| 亚洲激情av在线| 亚洲高清久久久| 天天综合天天综合色| 婷婷久久综合九色国产成人 | 亚洲精品中文字幕在线观看| 亚洲欧美一区二区视频| 亚洲人精品午夜| 亚洲小说春色综合另类电影| 亚洲国产视频a| 男女激情视频一区| 国产永久精品大片wwwapp| 丰满岳乱妇一区二区三区| 成人综合婷婷国产精品久久蜜臀| 成人免费va视频| 色噜噜狠狠一区二区三区果冻| 欧美日韩在线综合| 欧美一级久久久| 国产日韩欧美一区二区三区乱码 | 一二三区精品视频| 五月天一区二区| 精品一区在线看| www.av亚洲| 欧美日韩一二区| 久久综合久久久久88| 亚洲视频资源在线| 日本美女一区二区| 成人毛片在线观看| 欧美亚洲免费在线一区| 精品国产91洋老外米糕| 国产精品美女一区二区三区| 亚洲成人av中文| 国产美女一区二区三区| 色综合天天综合| 日韩一区二区中文字幕| 蜜臀国产一区二区三区在线播放| 韩国女主播成人在线| 色先锋aa成人| 日韩精品专区在线| 中文字幕字幕中文在线中不卡视频| 亚洲国产成人va在线观看天堂 | 欧美日韩在线不卡| 久久久久久久免费视频了| 亚洲精品国产品国语在线app| 蜜臀av国产精品久久久久| 丰满少妇久久久久久久 | 国产精品网曝门| 午夜精品久久久久久久久久久 | 欧美一级夜夜爽| 中文字幕第一区二区| 视频一区视频二区中文| 成人黄动漫网站免费app| 宅男噜噜噜66一区二区66| 国产精品伦理在线| 极品瑜伽女神91| 欧美性一二三区| 中文字幕在线观看不卡视频| 麻豆freexxxx性91精品| 91国产精品成人| 中文乱码免费一区二区| 另类专区欧美蜜桃臀第一页| 色又黄又爽网站www久久| 国产午夜一区二区三区| 日韩激情在线观看| 欧美在线综合视频| 亚洲人成伊人成综合网小说| 国产成人在线视频网站| 日韩一本二本av| 亚洲一区二区影院| 91丨porny丨在线| 欧美国产在线观看| 国产在线播放一区| 欧美一区二区免费| 午夜不卡av在线| 欧美变态口味重另类| 午夜精品在线看| 欧美性感一区二区三区| 一区二区三区免费网站| 成人免费高清在线| 亚洲国产精品t66y| 国产精品一区二区x88av| 欧美一区二区人人喊爽| 亚洲成人www| 欧美日韩美女一区二区| 一区二区三区四区av| 色综合久久中文综合久久牛| 中文字幕av一区二区三区高 | ww亚洲ww在线观看国产| 免费在线观看一区二区三区| 日本韩国一区二区| 亚洲精品老司机| 91在线精品一区二区三区| 国产精品久久看| 成人免费毛片片v| **性色生活片久久毛片| av男人天堂一区| 亚洲欧美一区二区三区极速播放| a在线欧美一区| 亚洲欧美日韩在线| 欧美性xxxxxxxx| 亚洲bt欧美bt精品| 欧美欧美欧美欧美| 久久国产精品第一页| www国产精品av| 成人免费观看男女羞羞视频| 亚洲天堂2016| 欧美福利视频一区| 日本aⅴ亚洲精品中文乱码| 日韩欧美国产wwwww| 激情综合网最新| 国产精品视频免费看| 色狠狠色狠狠综合| 丝袜a∨在线一区二区三区不卡| 91精品国产综合久久福利| 蜜臀av在线播放一区二区三区| 久久久美女艺术照精彩视频福利播放| 国产大陆精品国产| 国内外成人在线| 亚洲国产成人私人影院tom| 99精品黄色片免费大全| 亚洲综合精品自拍| 欧美一级久久久久久久大片| 国产在线精品免费av| 一色桃子久久精品亚洲| 欧美性大战xxxxx久久久| 久久99久久精品| 综合色中文字幕| 91精品国产日韩91久久久久久| 国产成人精品影视| 夜夜揉揉日日人人青青一国产精品| 日韩亚洲欧美一区| av男人天堂一区| 秋霞电影一区二区| 国产精品三级电影| 欧美高清精品3d| jlzzjlzz欧美大全| 日韩二区在线观看| 欧美国产精品中文字幕| 欧美高清www午色夜在线视频| 国产白丝网站精品污在线入口| 亚洲第一主播视频| 国产视频一区不卡| 欧美色区777第一页| 国产剧情一区在线| 亚洲3atv精品一区二区三区| 国产亚洲欧美在线| 欧美男男青年gay1069videost | 国产亚洲福利社区一区| 在线精品视频一区二区三四| 国产一区二区不卡| 亚洲第一电影网| 国产精品久久夜| 精品国产髙清在线看国产毛片| 欧美日韩综合一区| av在线不卡网| 国模套图日韩精品一区二区| 亚洲欧美日韩国产中文在线| 国产亚洲欧美日韩在线一区| 91精品中文字幕一区二区三区| 在线日韩一区二区| 不卡高清视频专区|