/// <summary>
 /// Returns the object with board configuration by the given type.
 /// </summary>
 private BoardConfiguration GetConfigurationByType(BoardType configurationType)
 {
     if (configurationType == BoardType.SMALL)
     {
         return(configuration = new SmallBoardConfiguration());
     }
     return(configuration = new LargeBoardConfiguration());
 }
 /// <summary>
 /// Save most common parameters to fields so as not to touch the configuration object every time (for convenience)
 /// The same is with the board manager to transfer it to passes.
 /// Initializes the imbalance for army generation.
 /// </summary>
 private void InitializeConfigurationParameters(BoardType configurationType, BoardManager boardManager)
 {
     configuration     = GetConfigurationByType(configurationType);
     blockWidth        = configuration.BlockWidth;
     blockHeight       = configuration.BlockHeight;
     blocksHorizontal  = configuration.BlocksHorizontal;
     blocksVertical    = configuration.BlocksVertical;
     this.boardManager = boardManager;
     //Initialize also imbalance.
     imbalance = startImbalance;
 }