Company: Yahoo
Difficulty: medium
Tennis Game State Calculator Problem Description Implement a function that reports the live score of a tennis match after a sequence of points has been played. Tennis Rules Tennis scoring works as follows: First score = 15 points Second score = 30 points Third score = 40 points Once a player has reached 40 points, the match can move into one of these states: A DEUCE state, when both players have won the same number of points An ADVANTAGE state, when both players have won at least three points each AND one player has won exactly one point more than the other A WIN , when a player has won at least four points AND leads the other by at least two points Function Parameters compute_game_state(nameP1, nameP2, wins) nameP1 : the name of the first player as a string nameP2 : the name of the second player as a string wins : a vector of strings, each entry naming the player who won that particular point, listed in the order the points were played Expected Result Return the current game state, fo