diff --git a/package.json b/package.json index 711b598..efb6e3f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "shelem", - "version": "1.1.4", + "version": "1.1.5", "description": "Shelem card game — multiplayer", "main": "server.js", "scripts": { diff --git a/public/app.js b/public/app.js index d41db2f..4f6a5cc 100644 --- a/public/app.js +++ b/public/app.js @@ -1037,7 +1037,7 @@ function renderWidowOverlay(st) { updateWidowPreview(st); } -const WIDOW_SUIT_ORDER = ['C', 'D', 'H', 'S']; +const WIDOW_SUIT_ORDER = ['C', 'D', 'S', 'H']; const WIDOW_SUIT_LABEL = { C: '♣', D: '♦', H: '♥', S: '♠' }; const WIDOW_JOKER_LABEL = { 'JOKER-COLOR': '🌈', 'JOKER-BLACK': '⚫' }; diff --git a/server.js b/server.js index e8124ce..7ae70a7 100644 --- a/server.js +++ b/server.js @@ -351,7 +351,8 @@ function trumpRank(card) { } // Suit display order: C D H S JOKER -const SUIT_ORD = { C: 0, D: 1, H: 2, S: 3, JOKER: 4 }; +// Alternate colours (black-red-black-red) so same-colour suits aren't adjacent +const SUIT_ORD = { C: 0, D: 1, S: 2, H: 3, JOKER: 4 }; function sortCards(hand) { return [...hand].sort((a, b) => { const sa = SUIT_ORD[suitOf(a)], sb = SUIT_ORD[suitOf(b)];