-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ensure update schedule function can update scores
- Loading branch information
1 parent
5b7f527
commit 0a42c67
Showing
4 changed files
with
155 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
interface IGameNoIds extends Omit<team.IGame, 'id' | 'opponent_id'> {} | ||
|
||
/** | ||
* Checks if two schedule games are equal. | ||
* @param game1 - The first game to compare. | ||
* @param game2 - The second game to compare. | ||
* @returns True if the games are equal, false otherwise. | ||
*/ | ||
export const scheduleGameIsEqual = ( | ||
game1: IGameNoIds, | ||
game2: IGameNoIds | ||
): boolean => | ||
game1.date === game2.date && | ||
game1.home === game2.home && | ||
game1.home_score === game2.home_score && | ||
game1.opponent_score === game2.opponent_score |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters