Public Class Form1
Private ShowBitMap As New Bitmap(20, 20), BackBitMap As New Bitmap(20, 20), BlockType As Integer, BlockState As Integer, NextType As Integer = 3, Blocks(,) As Integer '0 隐藏,1显示,2 静止
Private DrawRectangle As Rectangle = New Rectangle(2, 2, 15, 25), DrawLocation As Point = New Point(5, 0), Score(1) As Long
Private WithEvents MyTimer As New Timer
Private Function GetPreviewPoints(ByVal nType As Integer, ByVal nState As Integer) As Point()
If nType = 1 Then
If nState Mod 4 = 0 Then Return New Point() {New Point(0, 1), New Point(1, 1), New Point(2, 1), New Point(2, 0)}
If nState Mod 4 = 1 Then Return New Point() {New Point(0, 0), New Point(0, 1), New Point(0, 2), New Point(1, 2)}
If nState Mod 4 = 2 Then Return New Point() {New Point(0, 0), New Point(0, 1), New Point(1, 0), New Point(2, 0)}
If nState Mod 4 = 3 Then Return New Point() {New Point(0, 0), New Point(1, 0), New Point(1, 1), New Point(1, 2)}
ElseIf nType = 2 Then
If nState Mod 4 = 0 Then Return New Point() {New Point(0, 0), New Point(1, 0), New Point(2, 0), New Point(2, 1)}
If nState Mod 4 = 1 Then Return New Point() {New Point(0, 0), New Point(0, 1), New Point(0, 2), New Point(1, 0)}
If nState Mod 4 = 2 Then Return New Point() {New Point(0, 0), New Point(0, 1), New Point(1, 1), New Point(2, 1)}
If nState Mod 4 = 3 Then Return New Point() {New Point(1, 0), New Point(1, 1), New Point(1, 2), New Point(0, 2)}
ElseIf nType = 3 Then
If nState Mod 2 = 0 Then Return New Point() {New Point(0, 0), New Point(1, 0), New Point(2, 0), New Point(3, 0)}
If nState Mod 2 = 1 Then Return New Point() {New Point(0, 0), New Point(0, 1), New Point(0, 2), New Point(0, 3)}
ElseIf nType = 4 Then
If nState Mod 2 = 0 Then Return New Point() {New Point(0, 0), New Point(0, 1), New Point(1, 1), New Point(1, 2)}
If nState Mod 2 = 1 Then Return New Point() {New Point(0, 1), New Point(1, 0), New Point(1, 1), New Point(2, 0)}
ElseIf nType = 5 Then
If nState Mod 2 = 0 Then Return New Point() {New Point(0, 1), New Point(0, 2), New Point(1, 0), New Point(1, 1)}
If nState Mod 2 = 1 Then Return New Point() {New Point(0, 0), New Point(1, 0), New Point(1, 1), New Point(2, 1)}
ElseIf nType = 6 Then
If nState Mod 4 = 0 Then Return New Point() {New Point(0, 1), New Point(1, 0), New Point(1, 1), New Point(1, 2)}
If nState Mod 4 = 1 Then Return New Point() {New Point(0, 0), New Point(1, 0), New Point(1, 1), New Point(2, 0)}
详细解决方案
哟嗬.这不是159行的俄罗斯方块么.解决方法
热度:309 发布时间:2016-04-25 02:24:06.0
相关解决方案
- IE不支持JQuery吗?解决方法
- boa+cgi+sqlite3【基于web的数据采集并动态显示】解决方法
- cgi提取文件内容?解决方法
- java.lang.NoSuchMethodException: setId([Ljava.lang.String;)解决方法
- s标签 图片src 当action 解析?解决方法
- CAPTCHA 模块中 ajax form 导致CAPTCHA session reuse attack detected异常,解决方法
- java编程思想.解决方法
- SSH框架导入struts,hibernate,spring分先后顺序吗>>解决方法
- 关于遮罩层的。解决方法
- oracle 最近的时间(而不是前一天的时间) 跪求sql语句 。解决方法
- web service No services have been found.解决方法
- socket.connect(socketAddress,timeout ))解决方法
- description The requested resource (/gongqiu/goindex.action) is not available.解决方法
- javascript中===什么意思?解决方法
- struts工作流程~解决方法
- 求struts2玩的顺的人!解决方法
- Mybatis的mapper.是个接口?解决方法
- 求教一个关于两个list的类似求并集的算法。解决方法
- jquery+ajax网页被卡死,cpu爆掉! - -解决方法
- 怎样实现分页.解决方法
- mapping.findForward()执行后,没有跳转页面?解决方法
- Tomcat7 不支持这句代码,为什么?解决方法
- 经典<<thinking in java >>电子书+课后习题解答.解决方法
- 现在做的一个项目,遇到个坑爹的需求。解决方法
- 在servlet中存了cookie后,再转发到jsp,在jsp上得不到存的cookie, 可是一刷新就得到了,这是为什么?解决方法
- Cannot load JDBC driver class 'com.microsoft.jdbc.sqlserver.SQLServerDriver'解决方法
- 关于Struts2的list集合里面重复的值的处理办法。解决方法
- 关于servlet,晕了。解决方法
- 统计查询中的查询判断.解决方法
- jdk1.7改成jdk1.6要改哪里?解决方法