Skip to content

Commit 4060077

Browse files
committed
dropped firebase multiplayer idea for now
1 parent 44046c6 commit 4060077

36 files changed

+98
-3967
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,4 @@ The project is designed to be **scalable** — starting with the original RPS se
1616
**Tech Stack**
1717

1818
- **Frontend:** Vite + React + Tailwind CSS
19-
- **Backend:** Firebase (Realtime Database / Firestore, Hosting, optional Auth)
2019
- **Deployment:** Firebase Hosting (one-command deploy)

bun.lock

Lines changed: 0 additions & 159 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"@tailwindcss/vite": "^4.1.11",
1515
"class-variance-authority": "^0.7.1",
1616
"clsx": "^2.1.1",
17-
"firebase": "^12.1.0",
1817
"framer-motion": "^12.23.12",
1918
"lucide-react": "^0.539.0",
2019
"react": "^19.1.1",

src/App.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
import { Route, Routes } from "react-router-dom";
22
import Home from "./components/Home";
3-
import MultiplayerRoom from "./components/MultiplayerRoom";
43
import { SinglePlayerRoom } from "./singleplayer";
5-
import { MultiplayerRoom as MatchmakingRoom } from "./multiplayer/matchmaking";
64

75
function App() {
86
return (
97
<Routes>
108
<Route path="/" element={<Home />} />
11-
<Route path="/room/:roomId" element={<MultiplayerRoom />} />
129
<Route path="/room" element={<SinglePlayerRoom />} />
13-
<Route path="/multiplayer/:roomId" element={<MatchmakingRoom />} />
1410
</Routes>
1511
);
1612
}

src/components/Home.tsx

Lines changed: 4 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,19 @@ import { motion } from "framer-motion";
22
import { Button } from "./ui/button";
33
import { useNavigate } from "react-router-dom";
44
import { Star } from "lucide-react";
5-
import { useAuth } from "../contexts/AuthContext";
6-
import OnlineLobbyDialog from "./OnlineLobby";
7-
import { useGameStore } from "../store/gameStore";
8-
import { handleOnlinePlay } from "../services/gameService";
95
import SinglePlayerRoomConfigDialog from "../singleplayer/components/SinglePlayerRoomConfigDialog";
10-
import { MatchmakingLobby } from "../multiplayer/matchmaking";
11-
import { Dialog } from "./ui";
6+
127
import { useState } from "react";
13-
import { loginWithGoogle } from "../services/firebase";
148

159
export default function Home() {
1610
const navigate = useNavigate();
17-
const { user } = useAuth();
1811

1912
const [isDialogOpen, setIsDialogOpen] = useState(false);
20-
const [isQuickMatchOpen, setIsQuickMatchOpen] = useState(false);
21-
22-
const { isOnlineDialogOpen, isOnboarded, setIsOnlineDialogOpen } =
23-
useGameStore();
24-
2513
const handlePlayClick = () => {
2614
setIsDialogOpen(true);
2715
};
2816

29-
const handleOnlinePlayClick = () => {
30-
handleOnlinePlay(user);
31-
};
32-
33-
const handleQuickMatchClick = async () => {
34-
if (!user) {
35-
const { user: newUser } = await loginWithGoogle();
36-
if (newUser) {
37-
setIsQuickMatchOpen(true);
38-
} else {
39-
// Login failed
40-
}
41-
}
42-
setIsQuickMatchOpen(true);
43-
};
44-
45-
const handleConfirm = () => {
17+
const startSinglePlayer = () => {
4618
setIsDialogOpen(false);
4719
navigate("/room");
4820
};
@@ -88,7 +60,7 @@ export default function Home() {
8860
}}
8961
className="font-game text-white max-w-md text-center bg-green-500 p-2 px-4 rounded-sm flex items-center justify-center space-x-2"
9062
>
91-
<Star /> <span>Now Play Online</span>
63+
<Star /> <span>Online Soon</span>
9264
</motion.div>
9365
<div className="text-gray-500 text-lg max-w-md text-center">
9466
A simple game of war, where you can play against the computer or
@@ -100,31 +72,13 @@ export default function Home() {
10072
<Button variant="blue" onClick={handlePlayClick}>
10173
Play
10274
</Button>
103-
<Button variant="green" onClick={handleQuickMatchClick}>
104-
Quick Match
105-
</Button>
106-
<Button onClick={handleOnlinePlayClick}>Online Rooms</Button>
10775
</div>
10876

10977
<SinglePlayerRoomConfigDialog
110-
handleConfirm={handleConfirm}
78+
handleConfirm={startSinglePlayer}
11179
isDialogOpen={isDialogOpen}
11280
onClose={() => setIsDialogOpen(false)}
11381
/>
114-
115-
<OnlineLobbyDialog
116-
isOnboarded={isOnboarded}
117-
isOpen={isOnlineDialogOpen}
118-
onClose={() => setIsOnlineDialogOpen(false)}
119-
/>
120-
121-
<Dialog
122-
isOpen={isQuickMatchOpen}
123-
onClose={() => setIsQuickMatchOpen(false)}
124-
title="Quick Match"
125-
>
126-
<MatchmakingLobby onClose={() => setIsQuickMatchOpen(false)} />
127-
</Dialog>
12882
</div>
12983
);
13084
}

src/components/MultiplayerRoom.tsx

Lines changed: 0 additions & 147 deletions
This file was deleted.

src/components/Onboarding.tsx

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)