Block.cs

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tetris
{
    /// <summary>
    /// 生成类Block
    /// </summary>
    public class Block
    {
        //定义方块的大小属性:Width,Height
        /// <summary>
        /// 定义属性Width,表明方块的宽度
        /// </summary>
        private int width;
        public int Width
        {
            get { return width; }
            set { width = value; }
        }
        /// <summary>
        /// 定义属性Height,表明方块的高度
        /// </summary>
        private int height;
        public int Height
        {
            get { return height; }
            set { height = value; }
        }
        //方块的形状属性:shapeBlock,block
        /// <summary>
        /// 定义字段shapeBlock,表明方块的形状
        /// </summary>
        private readonly int shapeBlock;
        /// <summary>
        /// 定义字段block,表明在当前位置的方块子区域的当前状态,0表明无图片状态,1表明有图片状态
        /// </summary>
        public int[,] block;
        //方块的位置属性:Top,Left
        /// <summary>
        /// 定义属性Top,表明方块到游戏区域上顶部的距离
        /// </summary>
        private int top;
        public int Top
        {
            get { return top; }
            set { top = value; }
        }
        /// <summary>
        /// 定义属性Left,表明方块到游戏区域左边缘的距离
        /// </summary>
        private int left;
        public int Left
        {
            get { return left; }
            set { left = value; }
后面还有 97 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。