IsEmpty
How do I use Is Empty
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
Line | Code | Ex.. |
---|---|---|
116 | if (currentPlayer != Seed.Empty && cell.IsEmpty) | 1 |
20 | public bool IsEmpty { get { return Content == Seed.Empty; } } | 2 |
File name: Board.cs
Copy
114 private void OnCellClick(Cell cell)
115 {
116 if (currentPlayer != Seed.Empty && cell.IsEmpty)
117 {
118 cell.Set(currentPlayer);
119 lastChangedCell = cell;
120
121 if (onBoardChange != null)
122 {
123 onBoardChange(currentPlayer, cell.Row, cell.Col);
124 }
125 }
126 }
IsEmpty 102 lượt xem
Gõ tìm kiếm nhanh...