コード例 #1
0
 public void DrawBlock(int xPos, int yPos)
 {
     Console.ForegroundColor = ShapeColor;
     for (int i = 0; i < Shape.GetLength(0); i++)
     {
         for (int j = 0; j < Shape.GetLength(1); j++)
         {
             if (Shape[i, j])
             {
                 Console.SetCursorPosition(j + xPos, i + yPos);
                 Console.Write("█");
             }
         }
     }
     Console.ResetColor();
 }
コード例 #2
0
 /// <summary>
 /// Gets the column count.
 /// </summary>
 /// <returns>The column count.</returns>
 public int GetColumnCount()
 {
     return(Shape.GetLength(2));
 }
コード例 #3
0
 /// <summary>
 /// Gets the row count.
 /// </summary>
 /// <returns>The row count.</returns>
 public int GetRowCount()
 {
     return(Shape.GetLength(1));
 }