diff --git a/app/(basic)/rooms/[id]/Game.tsx b/app/(basic)/rooms/[id]/Game.tsx
index 84f7cee..cefc799 100644
--- a/app/(basic)/rooms/[id]/Game.tsx
+++ b/app/(basic)/rooms/[id]/Game.tsx
@@ -328,6 +328,77 @@ function Game({ roomCode, accessToken, user }: GameProps) {
)
}
+ const squares = board.squares.map((row, i) =>
+ row.map((cell, j) => {
+ if (!cell) {
+ return (
+ |
+ )
+ }
+
+ if (!isUserTurn) {
+ return (
+
+
+ |
+ )
+ }
+
+ if (board.isRedTurn === cell.isRed) {
+ return (
+
+
+ |
+ )
+ }
+
+ return (
+
+
+ |
+ )
+ })
+ );
+
return (
- {board.squares.map((row, i) =>
- row.map((cell, j) => {
- if (!cell) {
- return (
- |
- )
- }
-
- if (!isUserTurn) {
- return (
-
-
- |
- )
- }
-
- if (board.isRedTurn === cell.isRed) {
- return (
-
-
- |
- )
- }
-
- return (
-
-
- |
- )
- })
- )}
+ {(board.isHostRed && isHost) || (!board.isHostRed && !isHost) ? squares : squares.reverse()}