示例#1
0
        public bool isAt(int row, int col)
        {
            int inner_row = ToInnerRow(row);
            int inner_col = ToInnerCol(col);

            return(inner_row >= 0 &&
                   inner_row < tetromino.Rows() &&
                   inner_col >= 0 &&
                   inner_col < tetromino.Columns() &&
                   tetromino.CellAt(inner_row, inner_col) != Board.EMPTY);
        }
示例#2
0
 public Block(Tetromino grid)
 {
     this.rows    = grid.Rows();
     this.columns = grid.Columns();
     this.block   = new char[this.rows, this.columns];
     for (int row = 0; row < this.rows; row++)
     {
         for (int col = 0; col < this.columns; col++)
         {
             this.block[row, col] = grid.cellule(row, col);
         }
     }
 }
示例#3
0
 public int Rows()
 {
     return(inner.Rows());
 }