This repository contains a command-line application for managing a fantasy football league. Users can sign up, manage teams, conduct player transactions, and track league standings. The application is built using C++ and follows a modular design with a focus on scalability and maintainability.
-
User and Team Management
- Signup: Allows users to create a new team by providing a team name and password.
- Login/Logout: Users can log into their teams and log out when done.
- Admin Registration: Special accounts with administrative privileges can be created.
-
Player Transactions
- Buy/Sell Players: Users can buy or sell players from their teams based on availability.
- Transfer Window Management: Admins can open or close the transfer window, affecting when transactions can take place.
-
Match and League Management
- Team of the Week: Display the best-performing players for a given week.
- Match Results: View results of matches in the league by week.
- League Standings: Track the standings of teams in the league, showing scores, goals for, and goals against.
- User Rankings: Display rankings of users based on their teams' performance.
-
Detailed Reports
- Squad Overview: View detailed information about a fantasy team, including player roles and total points.
- League Standings: Show the ranking of teams in the league along with their scores and statistics.
- Weekly and Seasonal Statistics: Generate reports on team and player performance over specific weeks or the entire season.
-
Main Modules:
- Const.hpp: Defines constants used throughout the application.
- CountMission.hpp: Manages missions related to counting occurrences of events.
- DistanceMission.hpp: Handles missions that involve tracking distances.
- Driver.hpp: Represents the entity managing trips and missions.
- DriverMissionHandler.hpp: Manages the relationship between drivers and their assigned missions.
- InputHandler.hpp: Processes user input commands and translates them into actions.
- Mission.hpp: Base class for different types of missions in the game.
- TimeMission.hpp: Manages time-based missions, ensuring tasks are completed within deadlines.
- Trip.hpp: Handles the details of trips made by drivers or teams.
- Util.hpp: Utility functions used across the project for common tasks like calculations and data formatting.
-
CSV Files:
- premier_league.csv: Contains data related to teams and players in the Premier League.
- weeks_stats: Folder containing CSV files for weekly statistics.
data
├─── premier_league.csv
└─── weeks_stats
├─── week_1.csv
├─── week_2.csv
├─── week_3.csv
...
- C++ Compiler: Ensure you have a C++11 compatible compiler (e.g., g++).
- Makefile: The project includes a Makefile for compiling the code.
-
Clone the repository:
git clone https://github.com/tahamajs/Football_Fantasy_UT.git
-
Compile the code:
make
-
Run the application:
./bin/futballFantasy.out
-
Signup:
POST signup ? team_name Sharks password 021021
-
Login:
POST login ? team_name Sharks password 021021
-
Buy a Player:
POST buy_player ? name Virgil Van Dijk
-
Get Team of the Week:
GET team_of_the_week ? week 3
-
Get League Standings:
GET league_standings
This project is licensed under the MIT License. See the LICENSE
file for details.