Giter VIP home page Giter VIP logo

randompair's Introduction

Random Pair

Create randomize pair from a set of entities

Scenario

You are facing foosball competition for more than one seasons. There are lots of people registering for all seasons and you don't want to manually shuffle them to create each team. That would be waste of time.

Solution

Random Pair receive those people in a list as a text file and giving this input, it can (randomize) create the team automatically.

Usage

Compile it:

javac src/com/ksetyadi/randompair/RandomPair.java

and then run:

java com.ksetyadi.randompair.RandomPair < people_list.txt

Example

EXAMPLE 1

Everyone has the same level so you want to randomly form them directly into the team.

Example Input:

Satya
Armanto
Ksetyadi
Robby
Yanbul
Ary
Levady
Wandre

Example Output:

Team #1: Robby - Satya
Team #2: Ksetyadi - Wandre
Team #3: Ary - Levady
Team #4: Yanbul - Armanto

EXAMPLE 2

Some people have different level. You want to team up those people so there is no team with both member have the same level.

Example Input:

#Satya
Armanto
Ksetyadi
#Robby
#Yanbul
Ary
#Levady
Wandre

Example Output:

Team #1: Levady - Wandre
Team #2: Robby - Ksetyadi
Team #3: Armanto - Satya
Team #4: Ary - Yanbul

randompair's People

Stargazers

 avatar

Watchers

 avatar

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.