diff --git a/client/src/components/gameplay/game-chat.tsx b/client/src/components/gameplay/game-chat.tsx deleted file mode 100644 index c37ee71f..00000000 --- a/client/src/components/gameplay/game-chat.tsx +++ /dev/null @@ -1,103 +0,0 @@ -import { - Accordion, - AccordionBody, - AccordionHeader, - Button, -} from "@material-tailwind/react"; - -import { message } from "../../lib/icons_store"; - -import Icon from "@/components/gameplay/Icon.tsx"; -import { PaperAirplaneIcon } from "@heroicons/react/24/solid"; -import clsx from "clsx"; -import { animate, chat, players } from "@/lib/constants"; -import { useState } from "react"; - -export default function GameChat() { - const handleOpen = (value: number) => setOpen(open === value ? 0 : value); - const [open, setOpen] = useState(0); - return ( - } - className={clsx(open && "-mt-64", "w-96")} - animate={animate} - > - handleOpen(1)} - className={clsx( - open - ? "border border-[#27292F] bg-none rounded-t-3xl" - : "border-0 rounded-b-3xl bg-[url('./assets/brown-bg.png')] bg-cover bg-center bg-no-repeat rounded-full", - "px-3.5 backdrop-blur-sm cursor-pointer", - )} - > -
- end game -

- Message (0) -

-
-
- -
-
- {chat.map((item, index) => ( -
-
-
-
- end game -

- {item.user} -

-
-
-
-

{item.message}

-

- {item.date} -

-
-
-
- ))} -
-
-
- - -
-
-
-
-
- ); -} diff --git a/client/src/components/gameplay/quick-tutorial.tsx b/client/src/components/gameplay/quick-tutorial.tsx new file mode 100644 index 00000000..a50d3a71 --- /dev/null +++ b/client/src/components/gameplay/quick-tutorial.tsx @@ -0,0 +1,58 @@ +import { + Accordion, + AccordionBody, + AccordionHeader, + Button, +} from "@material-tailwind/react"; + +import Icon from "@/components/gameplay/Icon.tsx"; +import { PaperAirplaneIcon } from "@heroicons/react/24/solid"; +import clsx from "clsx"; +import { animate, chat, players } from "@/lib/constants"; +import { useState } from "react"; +import Book from "../ui/svgs/book"; + +export default function QuickTutorial() { + const handleOpen = (value: number) => setOpen(open === value ? 0 : value); + const [open, setOpen] = useState(0); + return ( + } + className={clsx(open && "-mt-64", "w-96", "z-40")} + animate={animate} + > + handleOpen(1)} + className={clsx("bg-[#B96539] border-2 border-[#602714] px-2.5", open ? "rounded-b-none rounded-t-xl" : "rounded-b-full rounded-t-full")} + > +
+ +

+ Quick Tutorial +

+
+
+ +
+
+
+
+
Game Objective
+

The objective of Mancala is to capture more stones than your opponent by the end of the game.

+
+
+
How to Get Extra Moves
+

You can get an extra turn if your last stone lands in your Mancala (seeds move in a counterclockwise direction)

+
+
+
How to Capture Opponent Seeds
+

If your last stone lands in an empty pit on your side, and the opposite pit on your opponent’s side has stones, you capture all the stones in that opposite pit, along with your last stone.

+
+
+
+
+
+
+ ); +} diff --git a/client/src/components/pits.tsx b/client/src/components/pits.tsx index 9b28db38..7e107147 100644 --- a/client/src/components/pits.tsx +++ b/client/src/components/pits.tsx @@ -88,7 +88,7 @@ export function BottomPit({
( + + + +); + +export default Book; \ No newline at end of file diff --git a/client/src/pages/Tutorial.tsx b/client/src/pages/Tutorial.tsx index dc4df7d5..34217546 100644 --- a/client/src/pages/Tutorial.tsx +++ b/client/src/pages/Tutorial.tsx @@ -10,7 +10,7 @@ import { } from "@/lib/constants"; import { useQuery } from "@apollo/client"; import AudioSection from "@/components/gameplay/audio-section"; -import GameChat from "@/components/gameplay/game-chat"; +import GameChat from "@/components/gameplay/quick-tutorial"; import EndgameButton from "@/components/gameplay/end-game-button"; import TimeoutButton from "@/components/gameplay/timeout-button"; import TutorialGameBoard from "@/components/tutorial/tutorial-board"; diff --git a/client/src/pages/games/Gameplay.tsx b/client/src/pages/games/Gameplay.tsx index 1d7b5055..cc8e553b 100644 --- a/client/src/pages/games/Gameplay.tsx +++ b/client/src/pages/games/Gameplay.tsx @@ -12,7 +12,7 @@ import { } from "@/lib/constants"; import { useQuery } from "@apollo/client"; import AudioSection from "@/components/gameplay/audio-section"; -import GameChat from "@/components/gameplay/game-chat"; +import QuickTutorial from "@/components/gameplay/quick-tutorial"; import RestartButton from "@/components/gameplay/restart-button"; import EndgameButton from "@/components/gameplay/end-game-button"; import GameNavigation from "@/components/gameplay/game-navigation"; @@ -133,7 +133,7 @@ export default function Gameplay() { setAction={setAction} />
- +