Skip to content

Instantly share code, notes, and snippets.

View diogobruni's full-sized avatar

Diogo Bruni diogobruni

View GitHub Profile
@diogobruni
diogobruni / matchmaker.js
Created May 20, 2024 03:31
BDO Matchmaker
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) {
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'