Skip to content

Commit

Permalink
メッセージを表示するスコアの基準を修正 (#141)
Browse files Browse the repository at this point in the history
* メッセージを表示するスコアの基準を修正

* 5.27.0
  • Loading branch information
na-trium-144 authored Nov 12, 2024
1 parent 7141d8b commit c609030
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions app/play/praise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ function choice(arr: string[]): string {
}

export function praiseMessage(score: number): string {
if (score >= 80) {
if (score >= 90) {
// A
return choice(["Fantastic!", "Amazing!", "Excellent!"]);
} else if (score >= 60) {
} else if (score >= 70) {
// B
return choice(["Nice job!", "Great!", "Cool!"]);
} else {
// C
return choice(["Good effort!", "Keep trying!", "Better luck next time!"]);
}
}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "falling-nikochan",
"version": "5.26.0",
"version": "5.27.0",
"private": true,
"type": "module",
"scripts": {
Expand Down

0 comments on commit c609030

Please sign in to comment.