using correct props instead of internal props for TicTacToeGame.tsx and BattleshipGame.tsx
This commit is contained in:
@@ -1,20 +1,10 @@
|
||||
import React, { useMemo } from "react";
|
||||
import { motion } from "framer-motion";
|
||||
import { useNakama } from "../../providers/NakamaProvider";
|
||||
import { PlayerModel } from "../../interfaces/models";
|
||||
|
||||
import PlacementGrid from "./placement/PlacementGrid";
|
||||
import ShotGrid from "./battle/ShotGrid";
|
||||
|
||||
interface BattleBoardProps {
|
||||
boards: Record<string, { grid: string[][] }>;
|
||||
players: PlayerModel[];
|
||||
myUserId: string | null;
|
||||
turn: number;
|
||||
winner: string | null;
|
||||
gameOver: boolean | null;
|
||||
metadata: Record<string, any>;
|
||||
}
|
||||
import { BattleshipGameProps } from "./props";
|
||||
|
||||
const Fleet: Record<string, number> = {
|
||||
carrier: 5,
|
||||
@@ -33,7 +23,7 @@ export default function BattleshipGame({
|
||||
winner,
|
||||
gameOver,
|
||||
metadata,
|
||||
}: BattleBoardProps) {
|
||||
}: BattleshipGameProps) {
|
||||
const { sendMatchData, matchId } = useNakama();
|
||||
|
||||
const myIndex = players.findIndex((p) => p.user_id === myUserId);
|
||||
|
||||
Reference in New Issue
Block a user