Code Monkey home page Code Monkey logo

pallet-ajuna-matchmaker's Introduction

Ajuna Network Pallet MatchMaker

This is a instantiable matchmaker Substrate pallet which lives as its own crate so it can be imported into multiple runtimes.

Purpose

This pallet acts as a matchmaker for pairing players to match each other.

Dependencies

Traits

This pallet does not depend on any externally defined traits.

Pallets

This pallet does not depend on any other FRAME pallet or externally developed modules.

Installation

Runtime Cargo.toml

To add this pallet to your runtime, simply include the following to your runtime's Cargo.toml file:

# external pallets
pallet-matchmaker = {default-features = false, version = '3.0.0', git = 'https://github.com/ajuna-network/pallet-jton-matchmaker.git', tag = 'monthly-2021-10' }

and update your runtime's std feature to include this pallet:

std = [
    # --snip--
    'pallet-matchmaker/std',
]

Runtime lib.rs

You should implement it's trait like so:

AmountPlayers, amount of players need to create a match. AmountBrackets, amount of brackets that exists for ranking or other purpose.

parameter_types! {
	pub const AmountPlayers: u8 = 2;
	pub const AmountBrackets: u8 = 3;
}

impl pallet_matchmaker::Config for Test {
	type Event = Event;
	type AmountPlayers = AmountPlayers;
	type AmountBrackets = AmountBrackets;
}

and include it in your construct_runtime! macro:

MatchMaker: pallet_matchmaker::{Pallet, Call, Storage, Event<T>},

Genesis Configuration

This matchmaker pallet does not have any genesis configuration.

Types

Additional types used in the matchmaker pallet

{
  "MatchingType": {
    "_enum": [
      "None",
      "Simple",
      "Same",
      "Mix"
    ]
  },
  "PlayerStruct": {
    "account": "AccountId"
  }
}

Reference Docs

You can view the reference docs for this pallet by running:

cargo doc --open

pallet-ajuna-matchmaker's People

Contributors

cowboy-bebug avatar darkfriend77 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pallet-ajuna-matchmaker's Issues

Add blocking, after multiple quite on Inititate game per session.

We don't want players queueing and then leaving once a match is setup and waits on initiate phase, of course it can happen, but if a person is quitting in that phase during a certain period multiple time, we should punish ban, or lock this account for a certain period of beeing able to queue.

Implement MatchingType

Implement the different matching types, so devs can choose how the matching happens, for now there should be three implementations.

Simple, is the standard implementations
Same, will not match different brackets together
Mix, will always mix brackets and never use same bracket for a match

the feature is not used currently, but it might have some use case for it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.