Skip to content

Tournament Protocol

sgfost edited this page Jan 26, 2024 · 28 revisions

Set up a new tournament

tournament messaging data flow

image

Diagram by @chrstngyn

create the tournament shell

  1. Create a new tournament via npm run cli:prod -- tournament create --tournamentName "Fall 2020 Mars Madness"
  2. Create the first tournament round with appropriate intro/exit survey URLs, numberOfGameRounds e.g., % npm run cli:prod -- tournament round create --tournamentId <pk> --introSurveyUrl=https://asu.qualtrics.etc --exitSurveyUrl=https://foo --numberOfGameRounds=27
  3. Create scheduled tournament round dates: % npm run cli:prod -- tournament round date --tournamentRoundId 6 --date "2020-10-02T15:00:00-07:00"
  4. Set isSignUpEnabled to false in keys/settings.json to prevent users from going to the generic thanks for signing up! SignedUp page and run % npm run cli:prod -- settings reload to get it to take effect
  5. Test

add the next round and invite eligible participants from the previous round

  1. backup db via npm run backupdb
  2. create new tournament round with appropriate intro and exit survey URLs and numberOfGameRounds as needed. Second round and later has a different introSurveyUrl but the same exitSurveyUrl
  3. create new scheduled tournament round dates for tournament round
  4. find eligible participants (top N point scorers from all games ending in victory) and select their user ids
  5. create tournament round invitations for the user ids selected in the previous step
  6. export email addresses for invited participants and send them all an email inviting them to participate in the new round (ideally as a mailchimp segment?)

In the future it would be nice to have a tournament admin dashboard to perform some / all of these tasks from a web UI.

Championship Round

  1. Confirm individually via bcc email with all prospective players that they can attend the approved time slot.
  2. Set up invitations
  3. Create a Google Calendar invite with a hidden invite list to help them keep track of the timing - should also consider putting the "Add to calendar" button prominently in the player dashboard for the championship round.

cli commands

Create a new tournament round

npm run cli:prod -- tournament round create --tournamentId <pk> --introSurveyUrl=https://asu.qualtrics.etc --numberOfGameRounds=11

Create a set of invites for users

npm run cli:prod -- tournament round invite --tournamentRoundId 6 --userIds 10 11 12 13 14 15

Export emails of invitees for a tournament round

npm run cli:prod -- tournament round emails --tournamentRoundId 6

This creates an emails.txt csv file to use for creating an email to send out.

create new scheduled tournament round date

% npm run cli:prod -- tournament round date --tournamentRoundId 6 --date "2020-10-02T15:00:00-07:00"

Creates a new scheduled TournamentRoundDate for round ID 6 at October 2, 2020 at 3PM local Arizona time.

change the maximum number of connections

Edit server/deploy/settings.template.json (if you want to make a permanent change for version control) and just change keys/settings.json

Then exec into the server container and run

% npm run cli:prod -- settings reload

to save your new settings

Data export

% ./dump.sh prod # all games
% ./dump.sh prod --tournamentRoundId 11 # dumps all games for the given tournament round 

SQL participant management queries

find users who have signed up but haven't participated yet (for reminder emails)

> select email, name from "user" where id > 31 and "isActive"=true and email is not null and id not in (select "userId" from "tournament_round_invite" where "hasParticipated"=true and "tournamentRoundId"=6);

Finalize an incomplete game

npm run cli:prod -- game finalize --gameId <gameId>

Changes a games status from incomplete to victory/failure depending on game events.

Past tournaments

Mars Madness February 2022

Schedule

Round 1: Wednesday 2022-02-23 to Sunday 2022-02-27 3pm + 7pm Arizona time

Round 2: Tuesday 2022-02-28 7pm Arizona time

Round 3: Thursday 2022-03-02 7pm Arizona time

Mars Madness November 2021

Round 1: M-F, 11/8 - 11/12 at 3pm & 7pm Arizona time Round 2: 2021-11-16 7pm Arizona time

Mars Madness Spring 2021

Round 1: M-F, 3/15 - 3/19 at 3pm & 7pm Arizona time Round 2: 3/22 7pm Arizona time

Mars Madness Fall 2020

1st Round

  • Tuesday, 10/20 at 3:00pm PST, 7:00pm PST
  • Wednesday, 10/21 at 3:00pm PST, 7:00pm PST
  • Thursday, 10/22 at 3:00pm PST, 7:00pm PST

2nd Round

  • Tuesday, 10/27 at 1500 PST

3rd Round (final)

  • Thursday, 10/29 at 1900 PST

Initialization

  • create new tournament and deactivate existing tournaments
  • create new tournament round with intro + exit survey URLs and appropriate number of game rounds
  • create new tournament round dates
  • create tournament round invites with hasParticipated=True for all prior participants in the earlier Pilot Test to prevent them from participating in this current round.

Pilot Test Tournament Fall 2020

  • Initial start, Wednesday September 30th at 3pm and 7pm Arizona time
  • Subsequent round on Friday (or continuing round 1 depending on participation)
  • final tournament champion round will either be Friday or the following week