This project is a simple Java library for managing a live scoreboard for football matches during a World Cup. It allows starting, updating, finishing matches, and retrieving a summary of ongoing matches.
- Start Match: Add a new match to the scoreboard with an initial score of
0-0. - Update Score: Update the score of an ongoing match with absolute values.
- Finish Match: Remove a match from the scoreboard.
- Get Summary: Retrieve a summary of ongoing matches, sorted by:
- Total score in descending order.
- For matches with the same total score, most recently started matches appear first.
Scoreboard scoreboard = new ScoreboardImpl();
Team homeTeam = new Team("Spain");
Team awayTeam = new Team("Brazil");
scoreboard.startMatch(homeTeam, awayTeam);