예제 #1
0
        private void InitialiseGame(IEnumerable <char> seed)
        {
            World           = seed;
            _worldDimension = (int)Math.Sqrt(seed.Count());

            var neighbourFinder = new NeighbourFinder(_worldDimension);
            var cellUpdater     = new CellUpdater();

            _worldGenerator = new WorldGenerator(neighbourFinder, cellUpdater);
        }
예제 #2
0
 public WorldGenerator(NeighbourFinder neighbourFinder, CellUpdater cellUpdater)
 {
     _neighbourFinder = neighbourFinder;
     _cellUpdater     = cellUpdater;
 }