Exemple #1
0
        private bool TryGetValueAt(int row, int column, out int?value, out string error)
        {
            AccessibleBoard board = new AccessibleBoard
            {
                AccessibleTiles = new List <Tile>()
                {
                    new Tile(0), new Tile(1), new Tile(2), new Tile(null)
                },
                AccessibleBlankIndex          = 3,
                AccessibleSize                = 2,
                AccessibleIsSolved            = true,
                AccessibleTotalMisplacedTiles = 0
            };
            BoardValueFetcher boardValueFetcher = new BoardValueFetcher();
            bool found = boardValueFetcher.TryGetValueAt(board, row, column, out value, out error);

            return(found);
        }
Exemple #2
0
 public BoardRenderer(BoardValueFetcher boardValueFetcher)
 {
     this.boardValueFetcher = boardValueFetcher;
 }