PHP Classes
elePHPant
Icontem

PHP Football Simulation: Compute football teams attack and defense strength

Recommend this page to a friend!
  Info   View files Example   View files View files (14)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2017-10-28 (3 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 103 This week: 4All time: 8,831 This week: 151Up
Version License PHP version Categories
php-football-simulat 1.0MIT/X Consortium ...5Algorithms, PHP 5, Games
Description Author

This package can compute football teams attack and defense strength.

It takes as parameters the football country teams, total games played, wins, draws, losses, scored and missed goals.

The package takes the parameters about the teams and calculates their strength and defense levels by determining games results using Poisson distribution.

Innovation Award
PHP Programming Innovation award nominee
December 2017
Number 4
Football is a very popular sport that is often used to create simulation games.

This package can perform several types of calculations related with the attack and defense of simulated football game.

Manuel Lemos
  Performance   Level  
Name: Aleksey <contact>
Classes: 1 package by
Country: Russian Federation Russian Federation
Innovation award
Innovation award
Nominee: 1x

Details

?# Football simulation

This is a simple simulator of football matches on PHP.

Input data

At the input, a CSV file with the following structure is expected:

Country;Total games;Wins;Draws;Losses;Scored and missed goals
Brazil;104;70;17;17;221 - 102
Germany;106;66;20;20;224 - 121
Italy;83;45;21;17;128 - 77
Argentina;77;42;14;21;131 - 84

Columns delimiter - ;.

Total columns - 6.

The 2-5 columns must contain integer values.

The last column expects two numeric values separated by a hyphen.

First line - is header.

After the first line a list of football teams is expected. The number of teams must be divisible by two.

Preview

Requirements

  • PHP 5.x/7.x

License

The MIT License (MIT)

Copyright © 2017, @meet-aleksey

  Files folder image Files  
File Role Description
Accessible without login Plain text file api.php Example Example script
Accessible without login Plain text file client.js Data Auxiliary data
Accessible without login Plain text file data.csv Data Auxiliary data
Accessible without login Plain text file FootballSimulation.phpproj Data Auxiliary data
Accessible without login Plain text file FootballSimulation.sln Data Auxiliary data
Accessible without login Plain text file index.php Aux. Auxiliary script
Accessible without login Plain text file LICENSE Lic. License text
Plain text file match.php Class Class source
Accessible without login Image file preview.gif Output Output results
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file README.ru.md Doc. Documentation
Plain text file stage.php Class Class source
Accessible without login Plain text file styles.css Data Auxiliary data
Plain text file team.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:103
This week:4
All time:8,831
This week:151Up