Specialized knowledge for maintaining and developing the Suit Clash card game.
This skill provides comprehensive knowledge and instructions for working on the Suit Clash project, a real-time multiplayer card game.
Suit Clash is a web-based multiplayer card game inspired by "Suit" (Rock-Paper-Scissors in Indonesian) but implemented using a standard deck of cards.
c:\laragon\www\suit-clash-updatedserver.jspublic/index.html (contains all CSS and Client JS)A: 14 (Highest)K: 13Q: 12J: 1110 through 2: Numeric value.currentSuit.tableHistory. The turn then shifts back, and the next player becomes the controller (Free Mode).freeMode).socket.emit)| Event | Payload | Description |
|---|---|---|
joinRoom | { name, room } | Joins a specific room. |
startGame | - | Host starts the game. |
playCard | { index, cardId } | Play a card from hand. |
drawCard | - | Draw from deck if no valid suit. |
takeTableCard | - | Take from table if deck is empty. |
reorderCardHand | { fromIndex, toIndex } | Manual sorting. |
chat | message | Send chat text. |
sendEmoji | { emoji, text } | Send animated emoji/taunt. |
getLeaderboard | - | Request global standings. |
restartGame | - | Host resets the game after Game Over. |
socket.on)| Event | Payload | Description |
|---|---|---|
state | GameState | Full sync of game data (cards, turns, etc). |
roundResolved | { winner, winnerName, roundCards } | Animation trigger for round end. |
playerOut | { name } | When someone empties their hand. |
gameOver | { loserName } | Final result. |
deckExhausted | { takerName, ... } | Alert when someone takes from table. |
leaderboardData | Array | Sorted list of player points. |
Located within <style> in index.html. Uses a "Casino Felt" aesthetic.
--felt: Primary green background (#1b4d35).--gold: Highlight color (#c9a84c).--card-bg: Creamy card color (#fdf8f0).top, left, right) and a central "Board" area.rooms Map. Each room has a GameState object.state event.node server.js
The server runs on http://localhost:1234 by default.
getRank(v) in server.js.nextTurn() and resolveRound() in server.js.renderHand() and renderTable() in index.html.showSelfEmoji(), playClutchSound() in index.html.GameState in makeGame() (Server).server.js and emit state.index.html to reflect the new state.