示例#1
0
 static void Main(string[] args)
 {
     TennisGame.GetScore("Tri", "Thanh", 1, 1);
     TennisGame.GetScore("Tri", "Thanh", 6, 4);
     TennisGame.GetScore("Tri", "Thanh", 0, 1);
     Console.ReadKey();
 }
示例#2
0
 public static void GetScore(string playerNameOne, string playerNameTwo, int NumScoreOne, int NumScoreTwo)
 {
     if (NumScoreOne == NumScoreTwo)
     {
         Console.WriteLine(TennisGame.GetNumEquals(NumScoreOne));
     }
     else if (NumScoreOne >= Num || NumScoreTwo >= Num)
     {
         Console.WriteLine(TennisGame.GetNumScoreEqualsNum(playerNameOne, playerNameTwo, NumScoreOne, NumScoreTwo));
     }
     else
     {
         Console.WriteLine(TennisGame.GetNumScoreNoEquals(NumScoreOne, NumScoreTwo));
     }
 }