예제 #1
0
 private bool HasWinningRow()
 {
     return(BoardLayout.Rows()
            .Select(row => row.GetFieldsIn())
            .Any(IsWinningLine));
 }
예제 #2
0
 private bool HasWinningDiagonal()
 {
     return(BoardLayout.Diagonals()
            .Select(diagonal => diagonal.GetFieldsIn())
            .Any(IsWinningLine));
 }
예제 #3
0
 private bool HasWinningColumn()
 {
     return(BoardLayout.Columns()
            .Select(column => column.GetFieldsIn())
            .Any(IsWinningLine));
 }