Пример #1
0
        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);
        }
Пример #2
0
        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;
        }
Пример #3
0
        public bool CheckTripple(int col, int row, Direction direction)
        {
            Tripple tripple = GetTripple(col, row, direction);

            if (tripple == null)
            {
                return(false);
            }
            return(tripple.CountCellContent());
        }