用代码写一个小游戏网站
Dim Type_Next As Integer '下一个框的类型。
Dim的状态以整数框旋转的形式出现。
“Dim fen As Integer”定义分数。
“Dim ji As Integer”定义了级别。
函数获取X值()
如果GetValue(1,2)那么'获取X值
如果MaxX-MinX & gt;那么= 2
如果MaxX-CurX & lt;= 1然后
Adjust_Left = MaxX - 2 - 1
其他
Adjust_Left = CurX - 1
如果…就会结束
获取X值=真
退出功能
如果…就会结束
如果…就会结束
获取X值=假
结束功能
函数GetValue(nType为整数,nWid为整数)
GetCoor
出错时继续下一步
Dim OKCount,EmptyCount为整数
MinX = Xs(1)。cX
MaxX = Xs(1)。cX
MinY = Xs(1)。日历年度(calendar year)
MaxY = Xs(1)。日历年度(calendar year)
对于i = 2到4
如果疯丫头& gtXs(i)。cX那么MinX = Xs(i)。cX
如果MaxX & ltXs(i)。cX则MaxX = Xs(i)。cX
如果MinY & gtXs(i)。cY Then MinY = Xs(i)。日历年度(calendar year)
如果MaxY & ltXs(i)。cY那么MaxY = Xs(i)。日历年度(calendar year)
然后
对于i = MinX到MaxX
对于j = MinY至MaxY
如果Total(i,j)则
GetValue = False
退出功能
如果…就会结束
然后
然后
如果nType = 0,则“获取Y值”
EmptyCount = 0 '获取MinY
OKCount = 0
对于i = MinY - 1至MinY - (nWid - 1)步骤- 1
对于j = MinX到MaxX
如果Total(j,i) = False,则OKCount = OKCount + 1
然后
如果OKCount & gt= picPictureNow。宽度和OKCount & gt= picPictureNow。那么身高呢
EmptyCount = EmptyCount + 1
OKCount = 0
其他
为...退出
如果…就会结束
然后
MinY = MinY - EmptyCount
如果MinY & lt1那么MinY = 1
EmptyCount = 0 'GetMaxY
OKCount = 0
对于i = MaxY + 1至MaxY + nWid - 1
对于j = MinX到MaxX
如果Total(j,i) = False,则OKCount = OKCount + 1
然后
如果OKCount & gt= picPictureNow。宽度和OKCount & gt= picPictureNow。那么身高呢
EmptyCount = EmptyCount + 1
OKCount = 0
其他
为...退出
如果…就会结束
然后
MaxY = MaxY + EmptyCount
如果MaxY & gt20那么MaxY = 20
“Else”获取X值
EmptyCount = 0 '获取MinX
OKCount = 0
对于i = MinX - 1到MinX - (nWid - 1)步骤- 1
对于j = MinY至MaxY
如果Total(i,j) = False,则OKCount = OKCount + 1
然后
如果OKCount & gt= picPictureNow。宽度和OKCount & gt= picPictureNow。那么身高呢
EmptyCount = EmptyCount + 1
OKCount = 0
其他
为...退出
如果…就会结束
然后
MinX = MinX - EmptyCount
如果疯丫头& lt1那么MinX = 1
EmptyCount = 0 'GetMaxX
OKCount = 0
对于i = MaxX + 1至MaxX + (nWid - 1)
对于j = MinY至MaxY
如果Total(i,j) = False,则OKCount = OKCount + 1
然后
如果OKCount & gt= picPictureNow。宽度和OKCount & gt= picPictureNow。那么身高呢
EmptyCount = EmptyCount + 1
OKCount = 0
其他
为...退出
如果…就会结束
然后
MaxX = MaxX + EmptyCount
如果MaxX & gt10,则MaxX = 10
如果…就会结束
GetValue = True
结束功能
函数获取Y值()
如果GetValue(0,2)那么'获取Y值
如果MaxY-MinY & gt;那么= 2
如果MaxY - (picPictureNow。top+1)& lt;= 1然后
Adjust_Top = MinY - 1
其他
Adjust_Top = picPictureNow。顶端
如果…就会结束
获取Y值=真
退出功能
如果…就会结束
如果…就会结束
获取Y值=假
结束功能
子全局初始化()
全局初始化
图片背景。Cls
imgPictureNext。Picture = LoadPicture(" ")
picPictureNow。可见=假
tmrDrop。启用=假
末端接头
子初始化()
每个盒子的初始化过程
picPictureNow。可见=假
tmrDrop。启用=假
Type_Now = Type_Next
picPictureNow。Picture = imgPictureNext。画
imgPictureNowBackup。Picture = picPictureNow。画
下一站Sel
intRotate = 0
picPictureNow。左= 4
picPictureNow。Top = 0
picPictureNow。可见=真
tmrDrop。启用=真
末端接头
Sub GetCoor()
得到一个正方形的四个点的坐标。
对于i = 1到4 'init
Xs(i)。cX = 0
Xs(i)。cY = 0
Xs(i)。cZ =假
然后
CurX = picPictureNow。左+ 1
选择案例类型_现在
案例1 '条
如果内含子模2 = 1,则
Xs(1)。cX = CurX
Xs(1)。cY = picPictureNow。Top + 1
Xs(1)。cZ =真
对于i = 2到4
Xs(i)。cX = CurX + i - 1
Xs(i)。cY = picPictureNow。Top + 1
Xs(i)。cZ =真
然后
其他
Xs(1)。cX = CurX
Xs(1)。cY = picPictureNow。Top + 4
Xs(1)。cZ =真
对于i = 2到4
Xs(i)。cX = CurX
Xs(i)。cY = picPictureNow。Top + i - 1
Xs(i)。cZ =假
然后
如果…就会结束
例2 '2字
如果内含子模2 = 1,则
Xs(1)。cX = CurX
Xs(1)。cY = picPictureNow。Top + 3
Xs(1)。cZ =真
Xs(2)。cX = CurX + 1
Xs(2)。cY = picPictureNow。Top + 2
Xs(2)。cZ =真
对于i = 3到4
Xs(i)。cX = CurX + i - 3
Xs(i)。cY = picPictureNow。Top + 5 - i
Xs(i)。cZ =假
然后
其他
Xs(1)。cX = CurX
Xs(1)。cY = picPictureNow。Top + 1
Xs(1)。cZ =真
Xs(2)。cX = CurX + 1
Xs(2)。cY = picPictureNow。Top + 2
Xs(2)。cZ =真
Xs(3)。cX = CurX + 2
Xs(3)。cY = picPictureNow。Top + 2
Xs(3)。cZ =真
Xs(4)。cX = CurX + 1
Xs(4)。cY = picPictureNow。Top + 1
Xs(4)。cZ =假
如果…就会结束
例3 '7字
选择病例引入模式4
案例0
Xs(1)。cX = CurX
Xs(1)。cY = picPictureNow。Top + 1
Xs(1)。cZ =真
Xs(2)。cX = CurX + 1
Xs(2)。cY = picPictureNow。Top + 3
Xs(2)。cZ =真
对于i = 3到4
Xs(i)。cX = CurX + 1
Xs(i)。cY = picPictureNow。Top + i - 2
Xs(i)。cZ =假
然后
案例1
Xs(1)。cX = CurX
Xs(1)。cY = picPictureNow。Top + 2
Xs(1)。cZ =真
Xs(2)。cX = CurX + 1
Xs(2)。cY = picPictureNow。Top + 2
Xs(2)。cZ =真
Xs(3)。cX = CurX + 2
Xs(3)。cY = picPictureNow。Top + 2
Xs(3)。cZ =真
Xs(4)。cX = CurX + 2
Xs(4)。cY = picPictureNow。Top + 1
Xs(4)。cZ =假
案例2
Xs(1)。cX = CurX
Xs(1)。cY = picPictureNow。Top + 3
Xs(1)。cZ =真
Xs(2)。cX = CurX + 1
Xs(2)。cY = picPictureNow。Top + 3
Xs(2)。cZ =真
对于i = 3到4
Xs(i)。cX = CurX
Xs(i)。cY = picPictureNow。Top + i - 2
Xs(i)。cZ =假
然后
案例3
Xs(1)。cX = CurX
Xs(1)。cY = picPictureNow。Top + 2
Xs(1)。cZ =真
Xs(2)。cX = CurX + 1
Xs(2)。cY = picPictureNow。Top + 1
Xs(2)。cZ =真
Xs(3)。cX = CurX + 2
Xs(3)。cY = picPictureNow。Top + 1
Xs(3)。cZ =真
Xs(4)。cX = CurX
Xs(4)。cY = picPictureNow。Top + 1
Xs(4)。cZ =假
结束选择
案例四T字
选择病例引入模式4
案例0
Xs(1)。cX = CurX
Xs(1)。cY = picPictureNow。Top + 2
Xs(1)。cZ =真
Xs(2)。cX = CurX + 1
Xs(2)。cY = picPictureNow。Top + 2
Xs(2)。cZ =真
Xs(3)。cX = CurX + 2
Xs(3)。cY = picPictureNow。Top + 2
Xs(3)。cZ =真
Xs(4)。cX = CurX + 1
Xs(4)。cY = picPictureNow。Top + 1
Xs(4)。cZ =假
案例1
Xs(1)。cX = CurX
Xs(1)。cY = picPictureNow。Top + 3
Xs(1)。cZ =真
Xs(2)。cX = CurX + 1
Xs(2)。cY = picPictureNow。Top + 2
Xs(2)。cZ =真
对于i = 3到4
Xs(i)。cX = CurX
Xs(i)。cY = picPictureNow。Top + i - 2
Xs(i)。cZ =假
然后
案例2
Xs(1)。cX = CurX
Xs(1)。cY = picPictureNow。Top + 1
Xs(1)。cZ =真
Xs(2)。cX = CurX + 1
Xs(2)。cY = picPictureNow。Top + 2
Xs(2)。cZ =真
Xs(3)。cX = CurX + 2
Xs(3)。cY = picPictureNow。Top + 1
Xs(3)。cZ =真
Xs(4)。cX = CurX + 1
Xs(4)。cY = picPictureNow。Top + 1
Xs(4)。cZ =假
案例3
Xs(1)。cX = CurX
Xs(1)。cY = picPictureNow。Top + 2
Xs(1)。cZ =真
Xs(2)。cX = CurX + 1
Xs(2)。cY = picPictureNow。Top + 3
Xs(2)。cZ =真
对于i = 3到4
Xs(i)。cX = CurX + 1
Xs(i)。cY = picPictureNow。Top + i - 2
Xs(i)。cZ =假
然后
结束选择
例5 '反7字
选择病例引入模式4
案例0
Xs(1)。cX = CurX
Xs(1)。cY = picPictureNow。Top + 3
Xs(1)。cZ =真
Xs(2)。cX = CurX + 1
Xs(2)。cY = picPictureNow。Top + 1
Xs(2)。cZ =真
对于i = 3到4
Xs(i)。cX = CurX
Xs(i)。cY = picPictureNow。Top + i - 2
Xs(i)。cZ =假
然后
案例1
Xs(1)。cX = CurX
Xs(1)。cY = picPictureNow。Top + 1
Xs(1)。cZ =真
Xs(2)。cX = CurX + 1
Xs(2)。cY = picPictureNow。Top + 1
Xs(2)。cZ =真
Xs(3)。cX = CurX + 2
Xs(3)。cY = picPictureNow。Top + 2
Xs(3)。cZ =真
Xs(4)。cX = CurX + 2
Xs(4)。cY = picPictureNow。Top + 1
Xs(4)。cZ =假
案例2
Xs(1)。cX = CurX
Xs(1)。cY = picPictureNow。Top + 3
Xs(1)。cZ =真
Xs(2)。cX = CurX + 1
Xs(2)。cY = picPictureNow。Top + 3
Xs(2)。cZ =真
对于i = 3到4
Xs(i)。cX = CurX + 1
Xs(i)。cY = picPictureNow。Top + i - 2
Xs(i)。cZ =假
然后
案例3
Xs(1)。cX = CurX
Xs(1)。cY = picPictureNow。Top + 2
Xs(1)。cZ =真
Xs(2)。cX = CurX + 1
Xs(2)。cY = picPictureNow。Top + 2
Xs(2)。cZ =真
Xs(3)。cX = CurX + 2
Xs(3)。cY = picPictureNow。Top + 2
Xs(3)。cZ =真
Xs(4)。cX = CurX
Xs(4)。cY = picPictureNow。Top + 1
Xs(4)。cZ =假
结束选择
案例6 '反2
如果内含子模2 = 1,则
Xs(1)。cX = CurX
Xs(1)。cY = picPictureNow。Top + 2
Xs(1)。cZ =真
Xs(2)。cX = CurX + 1
Xs(2)。cY = picPictureNow。Top + 3
Xs(2)。cZ =真
对于i = 3到4
Xs(i)。cX = CurX + i - 3
Xs(i)。cY = picPictureNow。Top + i - 2
Xs(i)。cZ =假
然后
其他
Xs(1)。cX = CurX
Xs(1)。cY = picPictureNow。Top + 2
Xs(1)。cZ =真
Xs(2)。cX = CurX + 1
Xs(2)。cY = picPictureNow。Top + 2
Xs(2)。cZ =真
Xs(3)。cX = CurX + 2
Xs(3)。cY = picPictureNow。Top + 1
Xs(3)。cZ =真
Xs(4)。cX = CurX + 1
Xs(4)。cY = picPictureNow。Top + 1
Xs(4)。cZ =假
如果…就会结束
案例7 '田字
Xs(1)。cX = CurX
Xs(1)。cY = picPictureNow。Top + 2
Xs(1)。cZ =真
Xs(2)。cX = CurX + 1
Xs(2)。cY = picPictureNow。Top + 2
Xs(2)。cZ =真
对于i = 3到4
Xs(i)。cX = CurX + i - 3
Xs(i)。cY = picPictureNow。Top + 1
Xs(i)。cZ =假
然后
结束选择
末端接头
Sub Judge_Full()
判断是否满了。
R_Value = picPictureNow。Top + 1分钟
rx_value = picPictureNow。Top + picPictureNow。最大高度
对于i = rx_value至R_Value步长-1
If Total(1,i) And Total(2,i) And Total(3,i) And Total(4,i) And Total(5,i) And _
Total(6,I)和Total(7,I)和Total(8,I)和Total(9,I)和Total(10,I)然后
如果一行已满,将这一行的所有图像下移一点。
k = BitBlt(picBackGround.hDC,0,20,200,(i - 1) * 20,picBackGround.hDC,0,0,vbSrcCopy)
SUCCESS = sndPlaySound(App。路径+" \ 45 \吃。WAV "、& ampH1)
分=分+ 10
Text1。文本=分
SUCCESS = sndPlaySound(App。Path + "\45\11。WAV "、& ampH1)
对于j = i到1步长-1
对于k = 1至10
总计(k,j) =总计(k,j - 1)
下一个k
下一个j
i = i + 1
如果…就会结束
接下来我
如果fen & gt= 1000
tmrDrop。间隔= 200
ji = 3
ElseIf fen & gt那么= 50
tmrDrop。间隔= 100
ji = 2
Else: tmrDrop。间隔= 450
ji = 1
如果…就会结束
文本2。Text =纪
如果当前盒子的顶点位置是
如果picPictureNow。Top & lt= 1然后
SUCCESS = sndPlaySound(App。路径+" \ 45 \死了。WAV "、& ampH1)
Select Case MsgBox ("demo,no!想再试试手吗?”, 4 + 32)
案例vbYes
命令2_Click
其他情况
全局_初始化
结束选择
如果…就会结束
末端接头