This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import PropTypes from 'prop-types' | |
import ReactNative, { Image, StyleSheet } from 'react-native' | |
/* Import Modules */ | |
// -- | |
/* Import Constants */ | |
import messages from '../../constants/messages' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { grabbers, blockers, tankers } from '../data/criterios' | |
export const make_a_match = (queue, { teamSize = 3, mmrDiff = 25, maxMMRDiff = 500 } = {}) => { | |
if (queue.length < teamSize * 2) { | |
throw new Error('Not enough players to make a match') | |
} | |
const sortedQueue = queue.sort((a, b) => b.mmr - a.mmr) | |
if (mmrDiff > maxMMRDiff) { |