Tetris/Tetrominos/TetrominoTypeO.cs

(完整代码) 1KB

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

namespace Tetris.Tetrominos
{
    /// <summary>
    /// O形方块
    /// 口口
    /// 口口
    /// </summary>
    public class TetrominoTypeO : Tetromino
    {
        
        public TetrominoTypeO(): base(Brushes.Red, TetrominoType.TypeO)
        {
            this.Blocks = new Block[4];
            Blocks[0] = new Block(0, 0, Color);
            Blocks[1] = new Block(0, 1, Color);
            Blocks[2] = new Block(1, 0, Color);
            Blocks[3] = new Block(1, 1, Color);
        }

        public override void RotateClockwise()
        {
            return;
        }

        public override void RotateCounterclockwise()
        {
            return;
        }

        public override void MoveToCenter()
        {
            MoveUp();
            MoveUp();
            for(int i = 0; i < 4; i++)
            {
                MoveRight();
            }
        }
    }
}

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

AI 解读 AI

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

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