package org.example.match;

import com.nhn.gameanvil.game.GameAnvilUserMatchMaker;
import com.nhn.gameanvil.node.match.AbstractUserMatchMaker;
import org.example.game.BasicRoom;

import java.util.List;

@GameAnvilUserMatchMaker(loadClass = BasicRoom.class)
public class BasicUserMatchMaker extends AbstractUserMatchMaker<BasicUserMatchInfo> {

    public BasicUserMatchMaker() {
        super(2, 5000);
    }

    private int matchSize = 2;

    @Override
    public void onMatch() {
        List<BasicUserMatchInfo> matchRequests = getMatchRequests(matchSize);

        if (matchRequests == null) {
            return;
        }

        int matchingAmount = matchSingles(matchRequests);
    }

    @Override
    public boolean onRefill(BasicUserMatchInfo matchReq) {
        return false;
    }
}
