/// <summary> /// Disposes the game settings and starts a new game. /// </summary> /// <param name="command">The command.</param> /// <param name="game">The game, whose methods Dispose and Play are used.</param> public override void ProcessCommand(string command, BullsAndCowsGame game) { if (command == RestartCommand) { game.Dispose(); game.Play(); } else if (this.Successor != null) { this.Successor.ProcessCommand(command, game); } else { throw new ArgumentNullException(NullExceptionText); } }