Esempio n. 1
0
 public bool Check(WordInfo word) => true;
Esempio n. 2
0
 public Result <IWordDrawer> GetDrawer(WordInfo wordInfo)
 {
     return(drawers.GetFirst(d => d.Check(wordInfo)));
 }
Esempio n. 3
0
 public bool Check(WordInfo wordInfo) => wordInfo.Word.Length < 4;
Esempio n. 4
0
 public void DrawWord(Graphics graphics, ImageCreatingOptions options, WordInfo wordInfo, Font font)
 {
     graphics.DrawString(wordInfo.Word, font, options.Brush, wordInfo.Rectangle);
 }
Esempio n. 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);
 }