Skip to content

Backend: Create Matches for Tournament Registered Players and Teams #66

@Ayush0316

Description

@Ayush0316

We need to implement backend logic that automatically generates matches for players and/or teams that have registered for a tournament. This functionality is crucial for progressing the tournament to the next phase.


Goals

  • Retrieve all registered players or teams for a given tournament
  • Create matchups based on a specific logic (e.g., random, seeded, round-robin, etc.)
  • Store the matches in the database with relevant metadata (e.g., match ID, round number, players/teams involved, scheduled time if applicable)
  • Handle edge cases (odd number of teams/players, duplicate entries, etc.)

🧩 Details

  • Input: Tournament ID

  • Output: List of generated match records stored in the database

  • Match model should include:

    • Match ID
    • Tournament ID
    • Participant A and B (can be player or team IDs)
    • Round (if applicable)
    • Status (e.g., pending, completed, inProgress)
    • Timestamps (createdAt, updatedAt)
    • IsDeleted flag.

📌 Tasks

  • Define the match creation logic (random/seeding system)
  • Retrieve registered participants for the given tournament
  • Generate and save matches
  • Unit test the match generation logic
  • Document the logic and API endpoints (if applicable)

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions