Tennis.TennisGame2.WonPoint C# (CSharp) Method

WonPoint() public method

public WonPoint ( string player ) : void
player string
return void
        public void WonPoint(string player)
        {
            if (player == "player1")
                P1Score();
            else
                P2Score();
        }

Usage Example

Ejemplo n.º 1
0
        public void NonExistingNameWonPoint()
        {
            var game = new TennisGame2("player1", "player2");

            game.WonPoint("player3");
            Assert.AreEqual(game.GetScore(), "Love-All");
        }
All Usage Examples Of Tennis.TennisGame2::WonPoint