using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Sudoku.UI
{
    public class XRow
    {
        public int C1 { get; set; }
        public int C2 { get; set; }
        public int C3 { get; set; }
        public int C4 { get; set; }
        public int C5 { get; set; }
        public int C6 { get; set; }
        public int C7 { get; set; }
        public int C8 { get; set; }
        public int C9 { get; set; }
        public int this[int key]
        {
            set
            {
                if (key == 1)
                {
                    C1 = value;
                }
                else if (key == 2)
                {
                    C2 = value;
                }
                else if (key == 3)
                {
                    C3 = value;
                }
                else if (key == 4)
                {
                    C4 = value;
                }
                else if (key == 5)
                {
                    C5 = value;
                }
                else if (key == 6)
                {
                    C6 = value;
                }
                else if (key == 7)
                {
                    C7 = value;
                }
                else if (key == 8)
                {
                    C8 = value;

                }
                else if (key == 9)
                {
                    C9 = value;
                }
            }
            get
            {
                if (key == 1)
                {
                    return C1;
                }
                else if (key == 2)
                {
                    return C2;
                }
                else if (key == 3)
                {
                    return C3;
                }
                else if (key == 4)
                {
                    return C4;
                }
                else if (key == 5)
                {
                    return C5;
                }
                else if (key ==6)
                {
                    return C6;
                }
                else if (key == 7)
                {
                    return C7;
                }
                else if (key == 8)
                {

                    return C8;
                }
                else if (key == 9)
                {
                    return C9;
                }
                throw new Exception("索引异常!");
            }
        }
    }
    public class XCell
    {
        public int R { get; set; }
        public int C { get; set; }
        public int B { get; set; }
        public int V { get; set; }
        public List<int> Candidate { get; set; }
        public XCell()
        {
            Candidate = new List<int>();
        }
    }
    public class XB
    {
        public int RBegin { get; set; }
        public int REnd { get; set; }
        public int CBegin { get; set; }
        public int CEnd { get; set; }
        public int B { get; set; }
    }
}
View Code

相关文章:

  • 2022-02-18
  • 2022-12-23
  • 2021-12-09
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2022-12-23
  • 2021-12-24
猜你喜欢
  • 2021-12-24
  • 2022-01-24
  • 2021-05-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-06
相关资源
相似解决方案