fixed game order
This commit is contained in:
1 parent
fb84c8229c
commit
e6675c0d90
1 file changed
+5
-5
@@ -32,17 +32,17 @@ export class GameService {
|
||||
|
||||
private chronologicalGameOrder(game1: Game, game2: Game): number {
|
||||
if (game1.date < game2.date) {
|
||||
return 1;
|
||||
return -1;
|
||||
}
|
||||
if (game1.date > game2.date) {
|
||||
return -1;
|
||||
}
|
||||
if (game1.time < game2.time) {
|
||||
return 1;
|
||||
}
|
||||
if (game1.time > game2.time) {
|
||||
if (game1.time < game2.time) {
|
||||
return -1;
|
||||
}
|
||||
if (game1.time > game2.time) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user