资源简介
vs2017完美运行,适合初学者学习学习,有需要的快快下载吧

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
namespace Tetris
{
public abstract class Brick
{
protected int m_curTransforIndex; //当前变形次序
public int m_needfulRows; //必要的行数
public int m_needfulColumns; //必要的列数
public int[] m_range; //变形范围
public Point m_center; //中心点(相对于必要区域)
public Point m_Pos; //中心点的位置(相对于画布)
///
/// 能否变形(能变形的条件为在砖块的变形范围内不能有其他砖块)
///
/// 画布模型
/// 画布行数
/// 画布列数
///
public abstract bool CanTransform(int[] arr int rows int columns);
///
/// 变形
///
public abstract void Transform();
///
/// 能否左移
///
/// 画布模型
/// 画布行数
/// 画布列数
///
public abstract bool CanLeftMove(int[] arr int rows int columns);
///
/// 左移
///
public void LeftMove()
{
m_Pos.Y -= 1;
}
///
/// 能否右移
///
/// 画布模型
/// 画布行数
/// 画布列数
///
public abstract bool CanRightMove(int[] arr int rows int columns);
///
/// 右移
///
public void RightMove()
{
m_Pos.Y += 1;
}
///
/// 能否下移
///
///
///
///
///
public abstract bool CanDropMove(int[] arr int rows int columns);
///
/// 下移
///
public void DropMove()
{
m_Pos.X += 1;
}
///
/// 随机生成一个可以通过变形得到的形状
///
public void RandomShape()
{
Random random = new Random();
this.m_curTransforIndex = random.Next(4);
this.Transform();
}
///
/// 设置中心点相对于画布的位置
///
/// 横向位置
/// 纵向位置
public void SetCenterPos(int x int y)
{
this.m_Pos = new Point(x y);
}
///
/// 获取砖块出现时中心点的Y轴坐标
///
///
public abstract int Appear();
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-09-04 17:52 俄罗斯方块\
目录 0 2018-09-04 17:52 俄罗斯方块\.vs\
目录 0 2018-09-04 17:52 俄罗斯方块\.vs\Tetris\
目录 0 2018-09-04 17:52 俄罗斯方块\.vs\Tetris\DesignTimeBuild\
文件 126 2018-07-31 08:51 俄罗斯方块\.vs\Tetris\DesignTimeBuild\.dtbcache
目录 0 2018-09-04 17:52 俄罗斯方块\.vs\Tetris\v15\
文件 69120 2018-07-31 15:19 俄罗斯方块\.vs\Tetris\v15\.suo
目录 0 2018-09-04 17:52 俄罗斯方块\.vs\Tetris\v15\Server\
目录 0 2018-09-04 17:52 俄罗斯方块\.vs\Tetris\v15\Server\sqlite3\
文件 0 2018-07-30 16:31 俄罗斯方块\.vs\Tetris\v15\Server\sqlite3\db.lock
文件 630784 2018-07-31 10:23 俄罗斯方块\.vs\Tetris\v15\Server\sqlite3\storage.ide
文件 32768 2018-07-31 08:52 俄罗斯方块\.vs\Tetris\v15\Server\sqlite3\storage.ide-shm
文件 4140632 2018-07-31 15:19 俄罗斯方块\.vs\Tetris\v15\Server\sqlite3\storage.ide-wal
目录 0 2018-09-04 17:52 俄罗斯方块\Tetris\
文件 860 2014-02-13 13:45 俄罗斯方块\Tetris.sln
文件 25600 2014-02-23 14:39 俄罗斯方块\Tetris.suo
文件 163 2018-07-30 16:31 俄罗斯方块\Tetris\app.config
目录 0 2018-09-04 17:52 俄罗斯方块\Tetris\bin\
目录 0 2018-09-04 17:52 俄罗斯方块\Tetris\bin\Debug\
文件 43520 2018-07-31 10:19 俄罗斯方块\Tetris\bin\Debug\Tetris.exe
文件 163 2018-07-30 16:31 俄罗斯方块\Tetris\bin\Debug\Tetris.exe.config
文件 91648 2018-07-31 10:19 俄罗斯方块\Tetris\bin\Debug\Tetris.pdb
文件 11608 2014-02-23 19:22 俄罗斯方块\Tetris\bin\Debug\Tetris.vshost.exe
文件 490 2010-03-17 22:39 俄罗斯方块\Tetris\bin\Debug\Tetris.vshost.exe.manifest
目录 0 2014-02-13 16:34 俄罗斯方块\Tetris\bin\Release\
文件 3362 2014-02-17 21:35 俄罗斯方块\Tetris\Brick.cs
文件 2266 2014-02-17 21:36 俄罗斯方块\Tetris\Brick1.cs
文件 14149 2014-02-17 21:37 俄罗斯方块\Tetris\Brick2.cs
文件 12434 2014-02-17 21:36 俄罗斯方块\Tetris\Brick3.cs
文件 12179 2014-02-23 13:58 俄罗斯方块\Tetris\Brick4.cs
文件 12176 2014-02-23 13:54 俄罗斯方块\Tetris\Brick5.cs
............此处省略34个文件信息
相关资源
- C# OCR数字识别实例,采用TessnetOcr,对
- 考试管理系统 - C#源码
- asp.net C#购物车源代码
- C#实时网络流量监听源码
- C#百度地图源码
- Visual C#.2010从入门到精通配套源程序
- C# 软件版本更新
- C#屏幕软键盘源码,可以自己定制界面
- 智慧城市 智能家居 C# 源代码
- c#获取mobile手机的IMEI和IMSI
- C#实现简单QQ聊天程序
- 操作系统 模拟的 欢迎下载 C#版
- C#写的计算机性能监控程序
- 用C#实现邮件发送,有点类似于outlo
- MVC model层代码生成器 C#
- c#小型图书销售系统
- C# Socket Server Client 通讯应用 完整的服
- c# winform 自动登录 百度账户 源代码
- C#编写的16进制计算器
- C#TCP通信协议
- C# 数据表(Dataset)操作 合并 查询一
- C#语音识别系统speechsdk51,SpeechSDK51L
- 数据库备份还原工具1.0 C# 源码
-
[免费]xm
lDocument 节点遍历C# - EQ2008LEDc#开发实例
- DirectX.Capturec# winform 操作摄像头录像附
- c# 实现的最大最小距离方法对鸢尾花
- C#版保龄球记分代码
- C#自定义控件
- 基于c#的实验室设备管理系统621530
评论
共有 条评论