public bool ConditionMet(Enums.Symbol playerSymbol, IGameBoard board) { var met = true; for (var i = 0; i < board.Size; i++) { if (board.Get(i, i) != playerSymbol) { met = false; break; } } if (met) { return(true); } met = true; var j = 0; for (var i = board.Size - 1; i >= 0; i--) { if (board.Get(j, i) != playerSymbol) { met = false; break; } j++; } return(met); }
public bool ConditionMet(Enums.Symbol playerSymbol, IGameBoard board) { for (var x = 0; x < board.Size; x++) { for (var y = 0; y < board.Size; y++) { if (board.Get(x, y) == Enums.Symbol.Empty) { return(false); } } } return(true); }
public bool ConditionMet(Enums.Symbol playerSymbol, IGameBoard board) { for (var column = 0; column < board.Size; column++) { var met = true; for (var row = 0; row < board.Size; row++) { met = met && board.Get(column, row) == playerSymbol; } if (met) { return(true); } } return(false); }
public bool InvalidMove(IGameBoard board, CellCord cellCord) { return(board.Get(cellCord.X, cellCord.Y) != Enums.Symbol.Empty); }