mirror of
https://github.com/cassoule/flopobot_v2.git
synced 2026-01-18 16:37:40 +01:00
quick fix
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// --- Constants for Deck Creation ---
|
||||
import {sleep} from "openai/core";
|
||||
import {emitSolitaireUpdate, emitUpdate} from "../server/socket.js";
|
||||
|
||||
const SUITS = ['h', 'd', 's', 'c']; // Hearts, Diamonds, Spades, Clubs
|
||||
const RANKS = ['A', '2', '3', '4', '5', '6', '7', '8', '9', 'T', 'J', 'Q', 'K'];
|
||||
@@ -353,10 +354,11 @@ export async function autoSolveMoves(gameState) {
|
||||
sourcePileType: 'tableauPiles',
|
||||
userId: gameState.userId,
|
||||
}
|
||||
moveCard(gameState, moveData);
|
||||
moveCard(gameState, moveData)
|
||||
emitSolitaireUpdate(gameState.userId, moveData);
|
||||
moved = true;
|
||||
await sleep(500); // Pause for visualization
|
||||
//TODO: maybe needs an emit here to update clients?
|
||||
|
||||
}
|
||||
}
|
||||
} while (moved)//(foundations.reduce((acc, pile) => acc + pile.length, 0));
|
||||
|
||||
@@ -344,4 +344,6 @@ export async function emitPokerToast(data) {
|
||||
}
|
||||
|
||||
export const emitUpdate = (type, room) => io.emit("blackjack:update", { type, room });
|
||||
export const emitToast = (payload) => io.emit("blackjack:toast", payload);
|
||||
export const emitToast = (payload) => io.emit("blackjack:toast", payload);
|
||||
|
||||
export const emitSolitaireUpdate = (userId, moveData) => io.emit('solitaire:update', {userId, moveData});
|
||||
Reference in New Issue
Block a user