コード例 #1
0
ファイル: Tennis.cs プロジェクト: modulexcite/codekatas
        static string ScoreForPlayersEqual(GamePoints points)
        {
            string scoreOfPlayerOne = Game.ScoreForPoint(points.PlayerOne);

              return points.IsAnyAboveThirty()
            ? "Deuce"
            : scoreOfPlayerOne + " All";
        }
コード例 #2
0
ファイル: Tennis.test.cs プロジェクト: modulexcite/codekatas
        public void Then_Is_Any_Above_Thirty_Is_True()
        {
            var points = new GamePoints {
                PlayerTwo = 3
            };

            Assert.IsTrue(points.IsAnyAboveThirty());
        }
コード例 #3
0
ファイル: Tennis.cs プロジェクト: modulexcite/codekatas
        static string ScoreForPlayersEqual(GamePoints points)
        {
            string scoreOfPlayerOne = Game.ScoreForPoint(points.PlayerOne);

            return(points.IsAnyAboveThirty()
        ? "Deuce"
        : scoreOfPlayerOne + " All");
        }
コード例 #4
0
ファイル: Tennis.test.cs プロジェクト: modulexcite/codekatas
 public void Then_Is_Any_Above_Thirty_Is_True()
 {
     var points = new GamePoints { PlayerTwo = 3 };
       Assert.IsTrue(points.IsAnyAboveThirty());
 }