コード例 #1
0
 private void SetLikelyWordMatchOnBoardForSelectedCell(CellEmptyViewModel value)
 {
    
     var words = Words.Where(x => x.Cells.Count(y => y.Col == value.Col && y.Row == value.Row) > 0
             );
     var word = CurrentGameState is GameFinishedWithErrorsState
                              ? words.FirstOrDefault(x => x.IsWordAnswerCorrect == false)
                              : words.FirstOrDefault();
     if (word == null)
     {
         SelectedWord = null;
         return;
     }
     if (word.Direction == Direction.Down)
     {
         SelectedWordDown = word;
     }
     else
     {
         SelectedWordAcross = word;
     }
 }
コード例 #2
0
 protected bool Equals(CellEmptyViewModel other)
 {
     return _col == other._col && _row == other._row && string.Equals(_value, other._value,StringComparison.OrdinalIgnoreCase) && _isVisible.Equals(other._isVisible) && string.Equals(_enteredvalue, other._enteredvalue, StringComparison.CurrentCultureIgnoreCase);
 }