private static void AddShips() { for (int i = 0; i < Galaxy.StarSystemsArr.Length; i++) { Galaxy.StarSystemsArr[i].shipsList = new List <Ship>(ShipsCreator.CreateRandomShips(Settings.TEST.TEST_SHIPS_IN_SYSTEM, i)); } }
static void Main(string[] args) { var config = ReadConfig(); var gridOptions = config.GetSection(GridOptions.Grid) .Get <GridOptions>(); var grid = new Grid(gridOptions.Size); var shipsOptions = config.GetSection(ShipsOptions.Ships) .Get <ShipsOptions>(); var shipsCreator = new ShipsCreator(new ShipAllocator(grid), shipsOptions.ShipsConfig); var game = new Game(grid, shipsCreator); }