server/models/game.js
// Validates the player and the hit
Validates the player and the hit
Validates the player and the hit
validateHit(clientId, cards) {
    if (this._turn.id !== clientId) {
      return false;
    }
    if (!this._turn.hasCardsInHand(cards)) {
      return false;
    }
    return CardHelper.validateHit(cards, this._previousHit.cards, this._table.length === 0, this.isRevolution());
  }
validateHit ( clientId , cards ) { if ( this . _turn . id !== clientId ) { return false ; } if ( ! this . _turn . hasCardsInHand ( cards ) ) { return false ; } return CardHelper . validateHit ( cards , this . _previousHit . cards , this . _table . length === 0 , this . isRevolution ( ) ) ; }
Validates the player and the hit
Validates the player and the hit
// Validate player id // Validate that the player has the given cards