Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client duration times should be more consistent #1

Open
flcdrg opened this issue Aug 29, 2013 · 2 comments
Open

Client duration times should be more consistent #1

flcdrg opened this issue Aug 29, 2013 · 2 comments

Comments

@flcdrg
Copy link
Contributor

flcdrg commented Aug 29, 2013

No description provided.

@benlaan
Copy link
Owner

benlaan commented Aug 29, 2013

Thanks @flcdrg . I've got a few points

  1. why did you change SubmitScore from !_scores.Any() to _scores.All(). Is this intentional? I'm not sure this is the same thing? Not any is the same as none, not all..
  2. Your C# files are adding spaces within the paranthesis on some changes.

@flcdrg
Copy link
Contributor Author

flcdrg commented Aug 29, 2013

Old line was
!_scores.Any(s => s == score)
replaced with
_scores.All(s => s != score)

So rather than ensuring that there are not any scores that match, we ensure that no scores match at all.
That sounds equivalent, and in fact should be more optimal as the All will stop as soon as the condition fails, whereas the Any needs to check all elements before returning.

Fixed the spacing to be consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants