public override void Reduce(Event evt, ModelTable table)
    {
        Type type = evt.GetType();

        if (type == typeof(NewGameBegun))
        {
            NewGameBegun gameBegun = (NewGameBegun)evt;
            table.InsertModel(gameBegun.playerId, new PlayerReadModel(gameBegun.playerId, gameBegun.playerName));
            return;
        }
    }
Exemple #2
0
 private void OnNewGameBegun(NewGameBegun evt)
 {
     this.id = evt.playerId;
 }