
public class TennisGame2 implements TennisGame
{
	//TODO: Revisar los siguientes nombres de variables
    public int P1point = 0;
    public int P2point = 0;
    
    public String P1res = "All";
    public String P2res = "All";
    private String player1Name;
    private String player2Name;
    private String[] scoreEquivalency = {"Love","Fifteen","Thirty","Forty"};
    private String score = "";
    
    public TennisGame2(String player1Name, String player2Name) {
        this.player1Name = player1Name;
        this.player2Name = player2Name;
    }

    public void reviewForDeuce(){
    	if (P1point==P2point && P1point>=3)
    		score = "Deuce";
    }
    
    public void reviewForWinner(){
        if (P1point>=4 && P2point>=0 && (P1point-P2point)>=2)
        {
            score = "Win for player1";
        }
        if (P2point>=4 && P1point>=0 && (P2point-P1point)>=2)
        {
            score = "Win for player2";
        }
    }
    
    public void reviewForAdvantageScore(){

        if (P1point > P2point && P2point >= 3)
        {
            score = "Advantage player1";
        }
        
        if (P2point > P1point && P1point >= 3)
        {
            score = "Advantage player2";
        }
    }
    
    public void reviewForTie(){
    	if (P1point == P2point && P1point < 4)
        {
            P1res = scoreEquivalency[P1point];
            P2res = "All";
        }
    }
    public void reviewScoreBoard(){
    	reviewForTie();
        if (P1point!=P2point && (P1point < 4 && P2point <4))
        {
                P1res=scoreEquivalency[P1point];
                P2res=scoreEquivalency[P2point];
        }
        score = P1res + "-" + P2res;
        reviewForDeuce();
        reviewForAdvantageScore();
        reviewForWinner();
    }
    public String getScore(){
        reviewScoreBoard();
        return score;
    }
    
    public void SetP1Score(int number){
        
        for (int i = 0; i < number; i++)
        {
            P1Score();
        }
            
    }
    
    public void SetP2Score(int number){
        
        for (int i = 0; i < number; i++)
        {
            P2Score();
        }
            
    }
    
    public void P1Score(){
        P1point++;
    }
    
    public void P2Score(){
        P2point++;
    }

    public void wonPoint(String player) {
        if (player == "player1")
            P1Score();
        else
            P2Score();
    }
}
@@ -180,27 +180,24 @@
 ng P1res = %22
-All
 %22;%0A    publi
@@ -210,27 +210,24 @@
 ng P2res = %22
-All
 %22;%0A    priva
@@ -1395,24 +1395,29 @@
     %7D%0A    %7D%0A
+    %0A
     public v
@@ -1424,57 +1424,45 @@
 oid 
-reviewScoreBoard()%7B%0A    %09reviewForTie();
+getScoreAvoidingSpecialCases()%7B
 %0A    
-    
+%09
 if (
@@ -1620,32 +1620,140 @@
 int%5D;%0A        %7D%0A
+    %7D%0A    %0A    public void reviewScoreBoard()%7B%0A    %09reviewForTie();%0A        getScoreAvoidingSpecialCases();%0A
         score = 

Refactor of functions almost completed