GithubHelp home page GithubHelp logo

gnyblast / futsal-team-builder Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 1.0 2.04 MB

This is an application to generate random but as balanced as possible teams for playing football. As much as it tries to make balanced teams, there is always some randomness in the code, so that things will get generated differently everytime. Which brings us to a point that might never exactly balanced but as close as possible.

Home Page: http://futsal.logeks.com

CSS 17.66% HTML 28.48% TypeScript 52.46% Dockerfile 1.40%
balanced football football-analytics futsal team-generator

futsal-team-builder's Introduction

Futsal-Team-Builder

Live: http://futsal.logeks.com

This is just a front-end application written with Angular 17 by using Angular Material Components to generate random but as balanced as possible teams for playing football. As much as it tries to make balanced teams, there is always some randomness in the code, so that things will get generated differently everytime. Which brings us to a point that might never exactly balanced but as close as possible.

  • Each player will have 3 rates: attack, defense and condition with a position information
  • This helps the application to use a biased calculation to generate a total score for a player then do the distribution depending on the positions as equally as possible
  • You can hide the player ratings at the end of the generation with a toggle button before sending it off to your lads ;)

Development

OR

  • You can just clone and run npm install && npm run start to start the test server, if you have npm and angular 17 pre-installed

OR With Docker

From the Project Top-Level:

  • First build the image: sudo docker build -t futsal-builder:latest -f docker/Dockerfile .
  • And run it to start the development server: sudo docker run -v ./:/app -p 4200:4200 futsal-builder:latest, you can add -d if you want detached

OR With Podman

From the Project Top-Level:

  • First build the image: podman build -t futsal-builder:latest -f podman/Containerfile .
  • And run it to start the development server: podman run -v ./:/app -p 4200:4200 futsal-builder:latest, you can add -d if you want detached

Anyone with a Typescript knowledge is welcome to extend the application

Demo button can be used to auto-fill the players from src/assets/test_players.json so that you can test the code quicker.

Production Build

  1. You can just clone and run npm install && npm run build to start the build, if you have npm and angular 17 pre-installed.

  2. You can use either podman or docker to build the image first as follows (note that this is same image as development one, so if you already have it, you don't need to re-build the image) and run it with build command:

    • Docker:

      • sudo docker build -t futsal-builder:latest -f docker/Dockerfile .
      • sudo docker run -v ./:/app futsal-builder:latest build
    • Podman:

      • podman build -t futsal-builder:latest -f podman/Containerfile .
      • podman run -v ./:/app futsal-builder:latest build

And results must be in dist directory of your project top-level.

Future development plans

  • Adding a save button next to each player
  • Adding a localstorage service that when this save button is clicked it will save the player to the localstorage of the browser
  • Adding a side-bar to the left that will display the players saved on localstorage and you can pick it from there to get added to the list
  • Adding export/import buttons to the localstorage, so that players can get saved to you local machine or imported from the file

futsal-team-builder's People

Contributors

gnyblast avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  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.