feat: Add 'Test Solo' feature to Cube Manager for randomized deck play, with server support for solo game state on rejoin.
This commit is contained in:
@@ -294,9 +294,16 @@ io.on('connection', (socket) => {
|
||||
if (currentDraft) socket.emit('draft_update', currentDraft);
|
||||
}
|
||||
|
||||
// Prepare Game State if exists
|
||||
let currentGame = null;
|
||||
if (room.status === 'playing') {
|
||||
currentGame = gameManager.getGame(roomId);
|
||||
if (currentGame) socket.emit('game_update', currentGame);
|
||||
}
|
||||
|
||||
// ACK Callback
|
||||
if (typeof callback === 'function') {
|
||||
callback({ success: true, room, draftState: currentDraft });
|
||||
callback({ success: true, room, draftState: currentDraft, gameState: currentGame });
|
||||
}
|
||||
} else {
|
||||
// Room found but player not in it? Or room not found?
|
||||
|
||||
Reference in New Issue
Block a user