コード例 #1
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            CellContent content = obj as CellContent;

            return(content.Rank == Rank);
        }
コード例 #2
0
        public int CompareTo(object anotherCellContent)
        {
            if (anotherCellContent == null)
            {
                return(1);
            }
            CellContent content = anotherCellContent as CellContent;

            return(Rank.CompareTo(content.Rank));
        }
コード例 #3
0
 /// <summary>
 /// Clears all non-fixed content
 /// </summary>
 public void ResetSudoku()
 {
     for (int x = 0; x < 9; x++)
     {
         for (int y = 0; x < 9; y++)
         {
             if (!this[x, y].IsFixed)
             {
                 this[x, y] = new CellContent(0);
             }
         }
         //rows.Add(new SudokuItem());
     }
 }
コード例 #4
0
        }  //ctor

        /// <summary>
        /// Copy constructor
        /// </summary>
        /// <param name="copy"></param>
        public CellContent(CellContent copy)
        {
            Rank       = copy.Rank;
            ContentStr = copy.ContentStr;
            IsFixed    = copy.IsFixed;
        }
コード例 #5
0
 public void ClearCell(int x, int y) => this[x, y]       = new CellContent(0);
コード例 #6
0
        public CellContent ToCellContent()
        {
            CellContent baseContent = new CellContent(this);

            return(baseContent);
        }
コード例 #7
0
 public GridContent(CellContent cell) : base(cell)
 {
 }