Skip to content

Commit

Permalink
Merge pull request #81 from Wiibleyde/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Wiibleyde authored Dec 26, 2024
2 parents 041ac9c + 71aa42e commit 690de69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ const halloweenPeriod: { start: Date, end: Date } = {
end: new Date(new Date().getFullYear(), 10, 7)
}
const christmasPeriod: { start: Date, end: Date } = {
start: new Date(new Date().getFullYear(), 11, 1),
end: new Date(new Date().getFullYear(), 0, 1)
start: new Date(new Date().getFullYear(), 12, 1),
end: new Date(new Date().getFullYear(), 12, 31)
}

const areInPeriod = (period: { start: Date, end: Date }) => {
Expand Down
1 change: 1 addition & 0 deletions src/utils/games/motus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export class MotusGame {
* @returns Whether the attempt is a winning attempt.
*/
public tryAttempt(attempt: string, userId: string): TryReturn {
attempt = attempt.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toUpperCase()
if (this.state !== GameState.PLAYING) return TryReturn.INVALID;
if (attempt.length !== this.wordLength) return TryReturn.INVALID;
if (this.tries.length === MotusGame.maxAttempts) return TryReturn.INVALID;
Expand Down

0 comments on commit 690de69

Please sign in to comment.