BlockInfo.cs

(完整代码) 925B

using System;
using System.Collections;
using System.Text;
using System.Drawing;

namespace Tetris
{
    class BlockInfo
    {
        private BitArray _id;
        private Color _bColor;
        public BlockInfo(BitArray id, Color bColor) //构造函数
        {
            _id = id;
            _bColor = bColor;
        }
        public BitArray ID
        {
            get { return _id; }
            set { _id = value; }
        }
        public Color BColor
        {
            get { return _bColor; }
            set { _bColor = value; }
        }
        public string GetIdStr()
        {
            StringBuilder s = new StringBuilder(25);
            foreach(bool b in _id)
            {
                s.Append(b ? "1" : "0");
            }
            return s.ToString();
        }
        public string GetColorStr()
        {
            return Convert.ToString(_bColor.ToArgb());
        }
    }
}

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

AI 解读 AI

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

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