Beispiel #1
0
 public void CrossBoardPreprocessTest()
 {
     ICrossBoard cb = new CrossBoard();
     cb.SetBoardSize(5, 5);
     for (int i = 0; i < 5; i++)
     {
         var sw = new StartWord();
         sw.StartX = i;
         sw.StartY = 0;
         cb.AddStartWord(sw);
         if (i > 0)
         {
             sw.StartX = 0;
             sw.StartY = i;
             cb.AddStartWord(sw);
         }
         else
         {
             sw.StartX = 2;
             sw.StartY = 2;
             cb.AddStartWord(sw);
         }
     }
     cb.Preprocess(new Dictionary(cb.MaxWordLength));
     Assert.Equal(8, cb.GetPatternCount());
 }
Beispiel #2
0
        public void AddStartWord(int aX, int aY)
        {
            var sw = new StartWord {
                StartX = aX, StartY = aY
            };

            AddStartWord(sw);
        }
Beispiel #3
0
 public void AddStartWord(StartWord aStartWord)
 {
     _startWords.Add(aStartWord);
 }