public HexHintList GetHintList(bool raw = false) { HexHintList list = new HexHintList(this); foreach (var hex in this) { if (hex.Value.Hint.IsError) { throw new Exception("OCR failed for some cells"); } switch (hex.Value.Hint.Area) { case CellHintArea.NONE: break; case CellHintArea.DIRECT: list.Add(new HexNeighborHint(this, hex.Value)); break; case CellHintArea.CIRCLE: list.Add(new HexAreaHint(this, hex.Value)); break; case CellHintArea.COLUMN_LEFT: case CellHintArea.COLUMN_DOWN: case CellHintArea.COLUMN_RIGHT: list.Add(new HexRowHint(this, hex.Value)); break; default: throw new ArgumentOutOfRangeException(); } } list.Add(new HexCellSumHint(this)); if (!raw) { list.CleanUp(); list.Optimize(); } return(list); }
private HexHintList GetHintList() { HexHintList list = new HexHintList(this); foreach (var hex in this) { switch (hex.Value.Hint.Area) { case CellHintArea.NONE: break; case CellHintArea.DIRECT: list.Add(new HexNeighborHint(this, hex.Value)); break; case CellHintArea.CIRCLE: list.Add(new HexAreaHint(this, hex.Value)); break; case CellHintArea.COLUMN_LEFT: case CellHintArea.COLUMN_DOWN: case CellHintArea.COLUMN_RIGHT: list.Add(new HexRowHint(this, hex.Value)); break; default: throw new ArgumentOutOfRangeException(); } } list.Add(new HexCellSumHint(this)); list.CleanUp(); list.Optimize(); return(list); }