Skip to content

Commit 80cb8cc

Browse files
committed
fix prettier plugin import
1 parent dca1c33 commit 80cb8cc

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.prettierrc.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
singleQuote: true,
55
trailingComma: "none",
66
printWidth: 100,
7-
plugins: ["prettier-plugin-astro", "prettier-plugin-svelte", "prettier-plugin-tailwind"],
7+
plugins: ["prettier-plugin-astro", "prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
88
overrides: [
99
{ "files": "*.svelte", "options": { "parser": "svelte" } },
1010
{

src/components/TicTacToe.svelte

+6-3
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@
4545
}
4646
4747
// randomly pick optimal or random move based on difficulty
48-
const spot = difficulty >= Math.random() ? computerPick() : available[Math.floor(Math.random() * available.length)];
48+
const spot =
49+
difficulty >= Math.random()
50+
? computerPick()
51+
: available[Math.floor(Math.random() * available.length)];
4952
board[spot[0]][spot[1]] = ai;
5053
5154
checkWinner(true);
@@ -59,7 +62,7 @@
5962
/**
6063
* Check if there is a winner
6164
* @param draw - if should update ui
62-
*/
65+
*/
6366
function checkWinner(draw: boolean) {
6467
let winner = null;
6568
@@ -120,7 +123,7 @@
120123
121124
currentPlayer = human;
122125
gameStatus = 'Winner:';
123-
};
126+
}
124127
125128
function computerPick() {
126129
let bestScore = -Infinity;

0 commit comments

Comments
 (0)