private void Load(SwarmService swarmService, int seed) { swarmService.Generate(); if (swarmService.Success) { _queue.Enqueue(new ResultCell(swarmService.Score, swarmService.Result)); } if (swarmService.CanGenerate) { Load(swarmService, ++seed); } }
private void StartLoading(int startHour, ParallelLoopState state) { var swarmService = new SwarmService(_teachers, _classes, _cabinetes, _rules, _scheduleLessons, _plans); Load(swarmService, 0); }