public Board(int boardSize, PositionFinder positionFinder, SurroundingTileFinder tileFinder) { _boardSize = boardSize; _positionFinder = positionFinder; _tileFinder = tileFinder; _maxTiles = _boardSize*_boardSize; _tiles = new List<PositionedTile>(); ResetTiles(); }
private static void Main(string[] args) { Console.Clear(); var positionFinder = new PositionFinder(_boardSize); var surroundingTileFinder = new SurroundingTileFinder(_boardSize, positionFinder); _gameEngine = new Game(new Board(_boardSize, positionFinder, surroundingTileFinder)); while (_gameEngine.Board.AvailableMoves().Count > 0) { DrawBoard(_gameEngine.Board); ProcessInput(); } DrawBoard(_gameEngine.Board); System.Console.WriteLine("\n\nGame Over. Score: " + _gameEngine.Score() + ". Press Enter to continue."); System.Console.ReadLine(); }