Ejemplo n.º 1
0
    public UIState Update(IUIMessage msg)
    {
        switch (msg)
        {
        case IncScore incScore: return(Update(this, incScore));

        case ToGameReadyUI toGameReadyUI: return(Update(this, toGameReadyUI));

        case ToGamePlayUI toGamePlayUI: return(Update(this, toGamePlayUI));

        case ToGameOverUI toGameOverUI: return(Update(this, toGameOverUI));

        default: throw new PatternMatchNotFoundException(msg);
        }
    }
Ejemplo n.º 2
0
 public void SendMessage(IUIMessage message)
 => networkOperator.Registers.ForEach <IUserInterface>(ui => ui.ProcessMessage(message));