diff options
Diffstat (limited to 'frontend')
| -rw-r--r-- | frontend/app/components/Gaming/ScoreBar.tsx | 7 | ||||
| -rw-r--r-- | frontend/app/routes/dashboard.tsx | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/frontend/app/components/Gaming/ScoreBar.tsx b/frontend/app/components/Gaming/ScoreBar.tsx index 4eac3ad..cacdd50 100644 --- a/frontend/app/components/Gaming/ScoreBar.tsx +++ b/frontend/app/components/Gaming/ScoreBar.tsx @@ -14,7 +14,12 @@ export default function ScoreBar({ scoreA, scoreB, bgA, bgB }: Props) { } else if (scoreB === null) { scoreRatio = 100; } else { - scoreRatio = (scoreB / (scoreA + scoreB)) * 100; + const rawRatio = scoreB / (scoreA + scoreB); + const k = 3.0; + const emphasizedRatio = + Math.pow(rawRatio, k) / + (Math.pow(rawRatio, k) + Math.pow(1 - rawRatio, k)); + scoreRatio = emphasizedRatio * 100; } return ( diff --git a/frontend/app/routes/dashboard.tsx b/frontend/app/routes/dashboard.tsx index 78ed531..3c4a684 100644 --- a/frontend/app/routes/dashboard.tsx +++ b/frontend/app/routes/dashboard.tsx @@ -41,7 +41,7 @@ export default function Dashboard() { {games.length === 0 ? ( <p>エントリーできる試合はありません</p> ) : ( - <ul className="divide-y"> + <ul className="divide-y divide-gray-300"> {games.map((game) => ( <li key={game.game_id} |
