matchmaking OK
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { ClientPlayer } from "./Client";
|
||||
import {gameUpdate} from "../gameUpdate.js"
|
||||
import { GameComponents } from "../../shared_js/class/GameComponents.js";
|
||||
import { clientInputListener } from "../wsServer.js";
|
||||
import * as c from "../constants.js"
|
||||
@@ -106,8 +105,8 @@ class GameSession {
|
||||
private _newRound(s: GameSession) {
|
||||
const gc = s.components;
|
||||
// https://fr.wikipedia.org/wiki/Tennis_de_table#Nombre_de_manches
|
||||
if (gc.scoreLeft >= 11
|
||||
|| gc.scoreRight >= 11)
|
||||
if (gc.scoreLeft >= 11 || gc.scoreRight >= 11)
|
||||
// if (gc.scoreLeft >= 2 || gc.scoreRight >= 2) // WIP: for testing
|
||||
{
|
||||
if (Math.abs(gc.scoreLeft - gc.scoreRight) >= 2)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user