Files
tic-tac-toe-ui/src/games/battleship/components/StatusBar.tsx
Vishesh 'ironeagle' Bangotra fe1cacb5ed feat(battleship): add complete Battleship game UI with placement & battle phases
- Implement BattleshipBoard with phase-based rendering (placement/battle)
- Add PlacementGrid for ship placement interaction
- Add ShotGrid for firing UI with turn validation
- Integrate match metadata (pX_placed, pX_ready, phase)
- Connect UI to Nakama sendMatchData (place + shoot actions)
- Add real-time board rendering for ships and shots
- Add status line, turn handling, and winner display
- Ensure compatibility with new backend ApplyMove/ApplyPlacement logic
2025-12-03 19:27:47 +05:30

25 lines
481 B
TypeScript

import React from "react";
import { motion } from "framer-motion";
interface StatusBarProps {
text: string;
}
export default function StatusBar({ text }: StatusBarProps) {
return (
<motion.div
key={text}
initial={{ opacity: 0, y: -6 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.25 }}
style={{
marginBottom: 8,
fontSize: "18px",
textAlign: "center",
}}
>
{text}
</motion.div>
);
}