コード例 #1
0
ファイル: MatchBO.cs プロジェクト: DevOpsEnthusiast/TennisHub
        public void AddMatch(string player1Name, string player2Name, string score)
        {
            PlayerBO playerbo = new PlayerBO();
            Player   player1  = playerbo.GetPlayerByName(player1Name);
            Player   player2  = playerbo.GetPlayerByName(player2Name);

            Match match = new Match();

            match.Player1 = player1;
            match.Player2 = player2;
            match.Score   = score;

            match.Winner = FindWinner(score, player1, player2);

            MatchDAL.GetInstance().Add(match);
        }
コード例 #2
0
ファイル: MatchBO.cs プロジェクト: DevOpsEnthusiast/TennisHub
 public List <Match> GetAllMatches()
 {
     return(MatchDAL.GetInstance().GetAllMatches());
 }