Пример #1
0
 public MainWindow(IMatrixAlgorithm matrixAlgorithm, IAiMove aiMove, ISerializeData serialize,
                   IDeSerializeData deserializeData, IIniParseData iniParseData, IDataBaseWriter dataBaseWriter)
 {
     this.matrixAlgorithm = matrixAlgorithm ?? throw new ArgumentNullException(nameof(matrixAlgorithm));
     this.aiMove          = aiMove ?? throw new ArgumentNullException(nameof(aiMove));
     this.serialize       = serialize ?? throw new ArgumentNullException(nameof(serialize));
     this.deserializeData = deserializeData ?? throw new ArgumentNullException(nameof(deserializeData));
     this.iniParseData    = iniParseData ?? throw new ArgumentNullException(nameof(iniParseData));
     this.dataBaseWriter  = dataBaseWriter ?? throw new ArgumentNullException(nameof(dataBaseWriter));
     this.settings        = new Settings
     {
         HistoryList = new List <History>()
     };
     this.gamePanel = new GamePanel();
     this.InitializeComponent();
     this.txtBoxTrackBar.Text = this.boardSizeTrackBar.Value.ToString();
 }
Пример #2
0
 public Level(int difficulty, IGamePanel <T> gamePanel, IEnumerable <int> possibleMinutes)
 {
     Difficulty      = difficulty;
     GamePanel       = gamePanel;
     PossibleMinutes = possibleMinutes.ToList();
 }