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; } } }
相关文章: