public bool MoveAllCells(Direction direction) { var anyMoves = false; foreach (var candidate in _board.GetMoveCandidates(direction)) { candidate.Target.Match( targetPos => { MoveToTarget(candidate.Origin, targetPos, candidate.Number); anyMoves = true; }, () => { } ); } return(anyMoves); }