From 0871cccee7fb5c09a4a4706070031aaed260c832 Mon Sep 17 00:00:00 2001 From: Milo Date: Mon, 7 Jul 2025 13:24:46 +0200 Subject: [PATCH] no more elo update when room is on fake money mode --- game.js | 19 +------------------ index.js | 1 - 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/game.js b/game.js index 86431c4..9b22f5c 100644 --- a/game.js +++ b/game.js @@ -220,25 +220,8 @@ export async function eloHandler(p1, p2, p1score, p2score, type) { }) } -export function pokerTest() { - console.log('pokerTest') - let hand1 = Hand.solve(['Ad', 'As', 'Jc', 'Th', '2d', '3c', 'Kd'], 'standard', false); - //let hand2 = Hand.solve(['Ad', 'As', 'Jc', 'Th', '2d', '3c', 'Kd'], 'standard', false); - let hand2 = Hand.solve(['Ad', 'As', 'Jc', 'Th', '2d', 'Qs', 'Qd'], 'standard', false); - /*console.log(hand1.name) - console.log(hand2.name) - console.log(hand1.descr) - console.log(hand2.descr)*/ - console.log(hand1.toString()) - console.log(hand2.toString()) - - let winner = Hand.winners([hand1, hand2]); // hand2 - console.log(winner) - console.log(winner.includes(hand1)); - console.log(winner.includes(hand2)); -} - export async function pokerEloHandler(room) { + if (room.fakeMoney) return let DBplayers = [] Object.keys(room.players).forEach(playerId => { const DBuser = getUser.get(playerId) diff --git a/index.js b/index.js index 04cbfdb..226b861 100644 --- a/index.js +++ b/index.js @@ -25,7 +25,6 @@ import { channelPointsHandler, eloHandler, pokerEloHandler, - pokerTest, randomSkinPrice, slowmodesHandler } from './game.js';