From f3e80fa74b089d50bb6cfa95be95b99c8c39bb08 Mon Sep 17 00:00:00 2001 From: Audiino <121476415+Audiino@users.noreply.github.com> Date: Thu, 12 Jun 2025 19:19:24 +0700 Subject: [PATCH 1/2] games: Scrabble duplicate words score fixed --- src/ps/games/scrabble/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ps/games/scrabble/index.ts b/src/ps/games/scrabble/index.ts index 670c469b..b739b0ee 100644 --- a/src/ps/games/scrabble/index.ts +++ b/src/ps/games/scrabble/index.ts @@ -491,7 +491,11 @@ export class Scrabble extends BaseGame { wordList: invalidWords.list(this.$T), }); } - const wordsPoints = Object.fromEntries(wordData as [string, number][]); + const wordsPoints = Object.fromEntries( + (wordData as [string, number][]).map( + ([word, points], index) => [word + '\u200b'.repeat(index), points] + ) + ); return { total: Object.values(wordsPoints).sum() + bingoPoints, bingo, words: wordsPoints }; } } From 350bfc24b62073f48a8401d918dc8c304ad76fb6 Mon Sep 17 00:00:00 2001 From: Audiino <121476415+Audiino@users.noreply.github.com> Date: Thu, 12 Jun 2025 19:40:00 +0700 Subject: [PATCH 2/2] committing the rest of the files --- README.md | 2 ++ src/ps/games/othello/render.tsx | 5 +---- src/ps/games/scrabble/index.ts | 6 ++---- src/web/react/README.md | 1 + 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index dd0a1c35..3a331127 100644 --- a/README.md +++ b/README.md @@ -25,12 +25,14 @@ This might take a while... ### Installation 1. **Clone the repository** + ```bash git clone https://github.com/PartMan7/PartBot.git cd PartBot ``` 2. **Install dependencies** + ```bash npm install ``` diff --git a/src/ps/games/othello/render.tsx b/src/ps/games/othello/render.tsx index 459a4968..7cee0b88 100644 --- a/src/ps/games/othello/render.tsx +++ b/src/ps/games/othello/render.tsx @@ -17,10 +17,7 @@ export function renderBoard(this: This, ctx: RenderCtx) { {cell ? ( ) : action ? ( - ) : null} diff --git a/src/ps/games/scrabble/index.ts b/src/ps/games/scrabble/index.ts index b739b0ee..32181e1a 100644 --- a/src/ps/games/scrabble/index.ts +++ b/src/ps/games/scrabble/index.ts @@ -492,10 +492,8 @@ export class Scrabble extends BaseGame { }); } const wordsPoints = Object.fromEntries( - (wordData as [string, number][]).map( - ([word, points], index) => [word + '\u200b'.repeat(index), points] - ) - ); + (wordData as [string, number][]).map(([word, points], index) => [word + '\u200b'.repeat(index), points]) + ); return { total: Object.values(wordsPoints).sum() + bingoPoints, bingo, words: wordsPoints }; } } diff --git a/src/web/react/README.md b/src/web/react/README.md index 8603435e..e04536e5 100644 --- a/src/web/react/README.md +++ b/src/web/react/README.md @@ -1,4 +1,5 @@ ## WARNING + `tsc` will NOT check any files under `@/web/react`! Please use an editor integration (eg: TSServer) to catch errors, since TypeScript does not properly support references with noEmit.