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; } }
private void OnNewGameBegun(NewGameBegun evt) { this.id = evt.playerId; }