Open twiglet opened 13 years ago
Or alternatively use the < > == comparison on the ints directly. Simply returning y.getScore() - x.getScore() would be a simple solution, Unfortunately this is not safe regarding int overflows. I have translated it to return y.getScore() == x.getScore() ? 0 : (y.getScore() > x.getScore() ? 1 : -1)
We haven't yet implemented the IComparer class. I will look into that. When we do then y.GetScore() should be automatically cast to an Integer before we call the Compare method.