Skip to content

Game master starts a round

Kiril Knysh edited this page Jul 29, 2017 · 2 revisions

❓ Game master starts a round (click on the "Start" button):

  1. _qd-ui -> fe-service:

    {
        to: 'front-service',
        message: {
            name: 'round.start'
        }
    }
  2. fe-service --> redemption:

    {
        to: 'state-service',
        message: {
            name: 'round.start',
            sessionId: 'rsconf-2017'
        }
    }
  3. redemption --> zandbak-service:

    {
        to: 'sandbox-service',
        message: {
            name: 'sandbox.set',
            input{JSON}: '[]',
            expected{JSON}: '[]',
            hidden: [
                { input{JSON}: '[][]', expected{JSON}: '[][]' }
            ]
            settings: {
                timeout: 50,
                reloadWorkers: false,
                refillWorkers: false
            }
        }
    }
  4. redemption --> fe-service:

    {
        to: 'front-service',
        message: {
            name: 'roundPhase.changed',
            roundPhase: "countdown",
            sessionId: 'rsconf-2017'
        }
    }
  5. fe-service -> _qd-ui:

    {
        to: '_qd-ui',
        message: {
            name: 'roundPhase.changed',
            roundPhase: 'countdown'
        }
    }
  6. redemption --> fe-service:

    {
        to: 'front-service',
        message: {
            name: 'startCountdown.changed',
            startCountdown: 3,
            sessionId: 'rsconf-2017'
        }
    }
  7. fe-service -> _qd-ui:

    {
        to: '_qd-ui',
        message: {
            name: 'startCountdown.changed',
            startCountdown: 3                
        }
    }

    Steps 6. and 7. are repeated until startCountdown is 0 (including).

  8. redemption --> fe-service:

    {
        to: 'front-service',
        message: {
            name: 'roundPhase.changed',
            roundPhase: "in-progress",
            sessionId: 'rsconf-2017'
        }
    }
  9. fe-service -> _qd-ui:

    {
        to: '_qd-ui',
        message: {
            name: 'roundPhase.changed',
            roundPhase: "in-progress"
        }
    }
  10. redemption --> fe-service:

```js
{
    to: 'front-service',
    message: {
        name: 'puzzle',
        input: '[]',
        expected: '{}',
        sessionId: 'rsconf-2017'
    }
}
```
  1. fe-service -> _qd-ui:

    {
        to: '_qd-ui',
        message: {
            name: 'puzzle',
            input: '[]',
            expected: '{}' 
        }
    }
  2. redemption --> fe-service:

    {
        to: 'front-service',
        message: {
            name: 'roundCountdown.changed',
            roundCountdown: 180,
            sessionId: 'rsconf-2017'
        }
    }
  3. fe-service -> _qd-ui:

    {
        to: '_qd-ui',
        message: {
            name: 'roundCountdown.changed',
            roundCountdown: 180
        }
    }

    Steps 12. and 13. are repeated until roundCountdown reaches 0 OR round is stopped by game master (go to step 4 in the next flow).