GithubHelp home page GithubHelp logo

league's Introduction

LEAGUE

This is simple foosball league project.

Implemented rules

  • Every match needs 4 players divided into 2 teams: white and red.
  • Every team contains of the defender and the attacker.
  • Every player plays with and against every other player at all positions and sides.
  • Every match ends when one of the teams (winner) scores 10 points.
  • It's not possible for match to end with draw but it's possible for one of the teams to score no points (0).
  • Each combinations of players, teams, and positions is unique in a season.
  • If combinations of players, teams, and positions has already been played in the season the match is saved as next season match.

Installation

  1. Install League using Composer:

    composer create-project --prefer-dist bizley/league league

  2. Prepare virtual host pointing to /public directory. Make sure server's URL rewrite engine is on.

  3. Prepare DB of your choice. You can find DB structure in /src/structure.sql file. Modify the SQL according to your DB engine if necessary.

  4. Insert all the players in DB table player. Column name stores player's initials and must be unique, column full stores player's full name, and column season stores number of first season player joined the league.

  5. Modify the /src/config.php file.

Stats

  • Stats are calculated for a season.
  • Player's place is set based on the average points.
  • Best side and position are set based on the number of wins.
  • Best and worst partners are counted based on the average points gained or lost in every match of the season.

Next match

  • Players available for next match are assigned to positions randomly.
  • Match drawing is repeated until the drawn match has not been played before in the season.
  • If all season combinations for available players have been already played next season match is drawn.

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.