BenNHTetris/Block1.cs

(开头部分) 2KB

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

///////////////////////////////////////////////////////////
//  Class			:	Block1.cs
//  CLRVersion		:	4.0.30319.42000
//  NameSpace		:	BenNHTetris
//  Created on		:	2018/5/31 11:41:37
//  Original author	:	JIYONGFEI 
//  JiYF笨男孩博客  :   https://www.cnblogs.com/JiYF/
///////////////////////////////////////////////////////////
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;

namespace BenNHTetris
{
    class Block1:Block
    {
        public Block1()
        {
            this._curChangeTimes = 0;
            this._needRows = 2;
            this._needColumns = 2;
            _range = new int[2, 2]{
                                    {1,1},
                                    {1,1} 
                                  };

            this._center = new Point(0,0);
            this._Pos = new Point();
        }

        public override bool CanChange(int[,] arr, int rows, int cloumns)
        {
            return false;
        }

        public override void Change()
        {
            return;
        }

        public override bool CanLeftMove(int[,] arr, int rows, int columns)
        {
            if (_Pos.X < 0)
            {
                if (_Pos.Y == 0 || arr[_Pos.X + 1, _Pos.Y - 1] == 1)
                {
                    return false;
                }
                else
                {
                    return true;
                }
            }
            if (_Pos.Y == 0 || arr[_Pos.X, _Pos.Y - 1] == 1 || arr[_Pos.X + 1, _Pos.Y - 1] == 1)
                return false;
            else
                return true;
        }
后面还有 33 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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