public void DoOneRun() { Algorithm.DoOneRun(); Assert.True(Algorithm.Tiles.Count() == 1, "no matching tiles found"); var foundTile = Algorithm.Tiles.FirstOrDefault(); Assert.NotNull(foundTile, "no tile found"); Assert.True("Hallo".ToCharTile(0, 0).EqualsValue(foundTile)); }
private void DoOneStep(object sender, RoutedEventArgs e) { SetInitialAlgorithm(); Algorithm.DoOneRun(); if (Algorithm.Finished) { StepButton.IsEnabled = false; RunButton.IsEnabled = false; labelFinished.Background = new SolidColorBrush(Color.FromRgb(0, 255, 0)); return; } //ResetColors(); var matches = Algorithm.TilesMatchedInLastRun; foreach (var tile in matches) { /* * ColorizeText(TextABox, tile); * ColorizeText(TextBBox, tile); * /* * ColorizeText(TextABox, tile.GetTokensAsString()); * ColorizeText(TextBBox, tile.GetTokensAsString()); * /* */ int lenTile = tile.Tokens.Count(); ColorizeText(TextABox, tile.IndexOnA, lenTile); ColorizeText(TextBBox, tile.IndexOnB, lenTile); /* */ Console.WriteLine("Tile:{0}", tile); _indexColorLookup++; } }