public void DeasilRotate()//顺时针旋转 { for (int i = 0; i < runBlock.Length; i++) { int x = runBlock.XPos + runBlock[i].Y; int y = runBlock.YPos + runBlock[i].X; if (x < 0 || x > _width - 1)//如果超出左右边界,则旋转失败 { return; } if (y < 0 || y > _heihgt - 1)//如果超出上下边界,则旋转失败 { return; } } runBlock.erase(gpPalette); runBlock.DeasilRotate(); runBlock.Paint(gpPalette); }