- Notifications
You must be signed in to change notification settings - Fork0
Micro-rollup for Unification Cup
NotificationsYou must be signed in to change notification settings
stackrlabs/unification-cup
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Micro-rollup forAvail's Unification Cup 2024
typeLeagueState={admins:string[];meta:{// metadata about the tournamentround:number;startTime:number;endTime:number;winnerTeamId:number;byes:{teamId:number;round:number;}[];};teams:{id:number;name:string;}[];matches:{id:number;scores:Record<string,number>;startTime:number;endTime:number;penaltyStartTime:number;winnerTeamId:number;}[];players:{id:number;name:string;teamId:number;removedAt?:number;}[];logs:{// logs of all the actions performed in the tournamentplayerId:number;matchId?:number;timestamp:number;action:string;}[];};
- startTournament: Start the tournament
- startMatch: Start a match with
matchId - penaltyShootout: Start a penalty shootout for a match with
matchId - endMatch: End a match with
matchId - logGoal: Log a goal for a player with
playerIdin a match withmatchId - logBlock: Log a block for a player with
playerIdin a match withmatchId - logFoul: Log a foul for a player with
playerIdin a match withmatchId - logPenaltyHit: Log a penalty hit for a player with
playerIdin a match withmatchId - logPenaltyMiss: Log a penalty miss for a player with
playerIdin a match withmatchId - addPlayer: Add a player with
playerIdto a team withteamId - removePlayer: Remove a player with
playerIdfrom a team withteamId - logByes: Log a bye for a team with
teamId. (Used in case of odd number of teams) - removeGoal: Remove a goal for a player with
playerIdin a match withmatchId
npm start
- Build the image using the following command: (make sure you replace `<NPM_TOKEN>` with the actual value)
# For Linuxdocker build -t unification-league:latest. --build-arg NPM_TOKEN=<NPM_TOKEN># For Mac with Apple Silicon chipsdocker buildx build --platform linux/amd64,linux/arm64 -t unification-league:latest. --build-arg NPM_TOKEN=<NPM_TOKEN>
- Run the Docker container using the following command:
# If using SQLite as the datastoredocker run -v ./db.sqlite:/app/db.sqlite -p<HOST_PORT>:<CONTAINER_PORT> --name=unification-league -it unification-league:latest# If using other URI based datastoresdocker run -p<HOST_PORT>:<CONTAINER_PORT> --name=unification-league -it unification-league:latest
About
Micro-rollup for Unification Cup
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.
Contributors5
Uh oh!
There was an error while loading.Please reload this page.
