public Tripple GetTripple(int col, int row, Direction direction) { Tripple tripple = new Tripple(); if (direction == Direction.horizontal) { if (col >= 8) { return(null); } for (int i = 0; i < 3; i++) { tripple.Examine[i] = GetCell(col + i, row); } } else { if (row >= 8) { return(null); } for (int i = 0; i < 3; i++) { tripple.Examine[i] = GetCell(col, row + i); } } return(tripple); }
public void SetTrippleCell(int col, int row, Direction direction, Byte number, char content, Source source) { Tripple tripple = GetTripple(col, row, direction); tripple.Examine[number].Content = content; tripple.Examine[number].Source = source; }
public bool CheckTripple(int col, int row, Direction direction) { Tripple tripple = GetTripple(col, row, direction); if (tripple == null) { return(false); } return(tripple.CountCellContent()); }