private void SetUpSettings()
 {
     settings      = MinesweeperGame.Settings;
     operators     = settings.Operators;
     FirstGuess    = settings.FirstGuess;
     x             = settings.x;
     y             = settings.y;
     numberofmines = settings.NumberOfMines;
     firststeprule = settings.FirstStepRule;
     rendering     = settings.Rendering;
     usagemode     = settings.usageMode;
     // if (usagemode == MinesweeperUsageMode.NoAI) { ClickToStep = false; useai = false; } originally the user could player but this functionality was removed
     if (usagemode == MinesweeperUsageMode.ClickToStepAI)
     {
         ClickToStep = true; useai = true;
     }
     else
     {
         ClickToStep = false; useai = true;
     }
     samplesize            = settings.SampleSize;
     sleeptime             = settings.SleepTime;
     solvertype            = settings.SolverType;
     guessor               = settings.guessorType;
     MGDSSP_UncoverMax     = settings.MGDSSP_UncoverMax;
     updatetime            = settings.DefaultSolvingSpeed;
     thinkingtime.text     = updatetime.ToString();
     gamestate             = MinesweeperGame.Gamestate;
     relativenumberofmines = (float)settings.NumberOfMines / (settings.x * settings.y);
     MaxSolvingLength      = settings.MaxSolvingLength;
 }
 public MinesweeperSettings(Vector2Int FirstGuess, int lengthX     = 9, int lengthY = 9, int numberOfMines = 10,
                            MinesweeperFirstStepRule firstStepRule = MinesweeperFirstStepRule.SafeSouranding,
                            bool rendering = true, MinesweeperUsageMode usageMode = MinesweeperUsageMode.NormalAI,
                            int sampleSize = 0, int sleepTime = 0,
                            MinesweeperSolverType solverType = MinesweeperSolverType.Standard_DSSP, GuessorType guessorType = GuessorType.Random,
                            float MGDSSP_UncoverMax          = 0, float DefaultSolvingSpeed = 0,
                            int MaxSolvingLength             = 10
                            )
 {
     x                = lengthX;
     y                = lengthY;
     NumberOfMines    = numberOfMines;
     FirstStepRule    = firstStepRule;
     Rendering        = rendering;
     this.usageMode   = usageMode;
     SampleSize       = sampleSize;
     SleepTime        = sleepTime;
     this.SolverType  = solverType;
     this.guessorType = guessorType;
     this.Operators   = new Vector2Int[8]
     {
         new Vector2Int(0, 1),
         new Vector2Int(1, 1),
         new Vector2Int(1, 0),
         new Vector2Int(1, -1),
         new Vector2Int(0, -1),
         new Vector2Int(-1, -1),
         new Vector2Int(-1, 0),
         new Vector2Int(-1, 1)
     };
     this.MGDSSP_UncoverMax   = MGDSSP_UncoverMax;
     this.FirstGuess          = FirstGuess;
     this.DefaultSolvingSpeed = DefaultSolvingSpeed;
     this.MaxSolvingLength    = MaxSolvingLength;
 }