HasSeed
How do I use Has Seed
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
Line | Code | Ex.. |
---|---|---|
86 | return cells[row, 0].HasSeed(seed) | 1 |
95 | return cells[0, col].HasSeed(seed) | 2 |
102 | return cells[0, 0].HasSeed(seed) | 3 |
109 | return cells[0, 2].HasSeed(seed) | 4 |
60 | public bool HasSeed(Seed seed) | 5 |
File name: Board.cs
Copy
82 private bool HasWonInTheRow(Seed seed)
83 {
84 int row = lastChangedCell.Row;
85
86 return cells[row, 0].HasSeed(seed)
87 && cells[row, 1].HasSeed(seed)
88 && cells[row, 2].HasSeed(seed);
89 }
File name: Board.cs
Copy
91 private bool HasWonInTheColumn(Seed seed)
92 {
93 int col = lastChangedCell.Col;
94
95 return cells[0, col].HasSeed(seed)
96 && cells[1, col].HasSeed(seed)
97 && cells[2, col].HasSeed(seed);
98 }
File name: Board.cs
Copy
100 private bool HasWonInTheDiagonal(Seed seed)
101 {
102 return cells[0, 0].HasSeed(seed)
103 && cells[1, 1].HasSeed(seed)
104 && cells[2, 2].HasSeed(seed);
105 }
File name: Board.cs
Copy
107 private bool HasWonInTheOppositeDiagonal(Seed seed)
108 {
109 return cells[0, 2].HasSeed(seed)
110 && cells[1, 1].HasSeed(seed)
111 && cells[2, 0].HasSeed(seed);
112 }
HasSeed 140 lượt xem
Gõ tìm kiếm nhanh...