Ejemplo n.º 1
0
 public void Join(RollDiceGame game)
 {
     if (IsInGame)
     {
         throw new InvalidOperationException();
     }
     currentGame = game;
     currentGame.AddPlayer(this);
 }
Ejemplo n.º 2
0
 public void LeaveGame()
 {
     if (!IsInGame)
     {
         throw new InvalidOperationException();
     }
     currentGame.RemovePlayer(this);
     currentGame = null;
 }