Add pets for tiers 1-3.

This commit is contained in:
Greyson Parrelli
2026-07-23 00:10:17 -04:00
parent 612a4e6227
commit 8d43bbf61e
14 changed files with 1915 additions and 406 deletions
+11 -3
View File
@@ -17,10 +17,18 @@ export function ArrangePhase({ view, you, send }: Props) {
const dragIndex = useRef<number | null>(null)
const locked = you.ready
// If the server-side deck changes (shouldn't during arrange, but be safe),
// resync.
// Resync only if the deck's actual contents changed — every broadcast
// creates a fresh array, and blindly resetting would wipe an in-progress
// ordering whenever the opponent acts.
useEffect(() => {
setOrder(you.deck ?? [])
setOrder((prev) => {
const deck = you.deck ?? []
const ids = new Set(deck.map((c) => c.id))
if (prev.length === deck.length && prev.every((c) => ids.has(c.id))) {
return prev
}
return deck
})
}, [you.deck])
function move(from: number, to: number) {