private CordinateSet GetRightDiagonalCordinates() { var rowCounter = GRID_WIDTH - 1; var winningCordinates = new CordinateSet(); foreach (var set in GetRowCordinateSets()) { var cords = set.Get().ToArray()[rowCounter]; rowCounter--; winningCordinates.Set(cords); } return(winningCordinates); }
private CordinateSet GetLeftDiagonalCordinates() { var rowCounter = 0; var winningCordinates = new CordinateSet(); foreach (var set in GetRowCordinateSets()) { var cords = set.Get().ToArray()[rowCounter]; rowCounter++; winningCordinates.Set(cords); } return(winningCordinates); }
private CordinateSet GetRowCordinates(int rowNumber) { var winningCordinates = new CordinateSet(); for (var c = 1; c <= GRID_WIDTH; c++) { var cords = new Cordinate { X = rowNumber, Y = c }; winningCordinates.Set(cords); } return(winningCordinates); }
private CordinateSet GetColumnCordinates(int columnNumber) { var winningCordinates = new CordinateSet(); for (var r = 1; r <= GRID_HEIGHT; r++) { var cords = new Cordinate { X = r, Y = columnNumber }; winningCordinates.Set(cords); } return(winningCordinates); }