Esempio n. 1
0
        public static void ProvideGuidance(guidanceType theType)
        {
            if (dontShow[(int)theType] == false)
            {
                bool found = false;
                foreach (var guidance in myGuidances)
                {
                    if (guidance.GetGuidanceType() == theType)
                    {
                        // The guidance is already being displayed
                        found = true;
                        break;
                    }
                }

                if (found == false)
                {
                    string text = "Generic guidance message";

                    switch (theType)
                    {
                    case guidanceType.BOARD_INPUT:
                        text  = "You may enter the values into the input board via mouse, keyboard and TAB key.";
                        text += " Unknown squares may be left blank or filled with a 0.";
                        break;

                    case guidanceType.FAST_ENTRY:
                        text  = "This is the fast entry box. You may enter the values via keyboard but unknown squares require a 0 be provided.";
                        text += " You may also copy-and-paste a position from a text file into this box.";
                        break;

                    case guidanceType.GUESSES:
                        text  = "Guesses are the alternative positions generated from a valid position when all other algorithmic methods have failed.";
                        text += " One day I hope to have this number down to 0.";
                        break;

                    case guidanceType.SURRENDERS:
                        text = "A solver surrenders and makes guesses when it can't make any more progress using algorithmic techniques.";
                        break;

                    case guidanceType.DEAD_ENDS:
                        text = "This is the number of dead ends produced in the solving process.";
                        break;

                    case guidanceType.BEST_SCORE:
                        text = "Best score shows the progress of the solving process. 405 means a solution has been found.";
                        break;

                    case guidanceType.OUTPUT_BOARD:
                        text = "Results are shown here. Some puzzles can take a long time. The indicators below show the solving progress.";
                        break;
                    }
                    Guidance em = new Guidance(text, theType);
                    myGuidances.Add(em);
                    em.Show();
                }
            }
        }
Esempio n. 2
0
 public static void RemoveGuidance(guidanceType theType)
 {
     foreach (var guidance in myGuidances)
     {
         if (guidance.GetGuidanceType() == theType)
         {
             myGuidances.Remove(guidance);
             guidance.kill();
             break;
         }
     }
 }
Esempio n. 3
0
 public static void SetBlocked(guidanceType theType, bool theVal)
 {
     dontShow[(int)theType] = theVal;
 }