bizley / league
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:project
pkg:composer/bizley/league
Requires
- php: >=7.1.0
- ext-gd: *
- ext-pdo: *
Requires (Dev)
- roave/security-advisories: dev-master
README
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
- 
Install League using Composer: composer create-project --prefer-dist bizley/league league
- 
Prepare virtual host pointing to /publicdirectory. Make sure server's URL rewrite engine is on.
- 
Prepare DB of your choice. You can find DB structure in /src/structure.sqlfile. Modify the SQL according to your DB engine if necessary.
- 
Insert all the players in DB table player. Columnnamestores player's initials and must be unique, columnfullstores player's full name, and columnseasonstores number of first season player joined the league.
- 
Modify the /src/config.phpfile.
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.