Exemple #1
0
 public bool Check(WordInfo word) => true;
Exemple #2
0
 public Result <IWordDrawer> GetDrawer(WordInfo wordInfo)
 {
     return(drawers.GetFirst(d => d.Check(wordInfo)));
 }
Exemple #3
0
 public bool Check(WordInfo wordInfo) => wordInfo.Word.Length < 4;
Exemple #4
0
 public void DrawWord(Graphics graphics, ImageCreatingOptions options, WordInfo wordInfo, Font font)
 {
     graphics.DrawString(wordInfo.Word, font, options.Brush, wordInfo.Rectangle);
 }
Exemple #5
0
 /// <summary>
 ///     Sets the drawer with highest priority that checks given wordInfo to draw next word.
 ///     Priority sets as order of drawers in constructor: earlier position means higher priority.
 /// </summary>
 public bool TryGetDrawer(WordInfo wordInfo, out IWordDrawer drawer)
 {
     drawer = drawers.FirstOrDefault(d => d.Check(wordInfo));
     return(drawer != null);
 }