yuriyoleynikov / YoTennis

Application for Tennis stats.
0 stars 0 forks source link

Implement GameModel class. #2

Closed yuriyoleynikov closed 7 years ago

yuriyoleynikov commented 7 years ago

Addresses #1

Igorbek commented 7 years ago
class GameHandler
{
  // any state data

  public void AddEvent(GameEvent e)
  {
    ((dynamic)this).On((dynamic)e);
  }

  private void On(DrawEvent e)
  {
     ...
  }

  private void On(ServeFailEvent e)
  {
    ...
  }
}