Skip to content

littleBitsman/matchmaker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

matchmaker

Simplistic matchmaker based off of matchmaker, but with type definitions. The original is no longer maintained, so I made this.

    var mymatch = require('matchmaker.js').newMatchmaker({
        // your options here...
    });
    mymatch.policy = function(a,b) {
        if (Math.abs(a.rank-b.rank) < 20)
            return 100
        else 
            return 0
    };
    mymatch.on('match', function(a, b) {
        console.log(a); // match a
        console.log(b); // match b
    });
    mymatch.start();

Then we can

    mymatch.push({user:'walter',rank:1450});
    mymatch.push({user:'skyler',rank:1465});

See type definitions for more info.

About

policy free matchmaking - match and create pairs easily

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 91.0%
  • JavaScript 9.0%