public void AttachPiece(TetrisPiece piece) { if (IsInside(piece)) { for (int itRow = 0; itRow < piece.size.row; itRow++) { for (int itCol = 0; itCol < piece.size.col; itCol++) { if (piece.Get(itRow, itCol) == 1) { boardData[piece.position.row + itRow, piece.position.col + itCol] = piece.Get(itRow, itCol); tetrisCells[piece.position.row + itRow, piece.position.col + itCol] = piece.GetCell(itRow, itCol); } } } } }