-
Notifications
You must be signed in to change notification settings - Fork 2.4k
/
CricinfoSystem.cs
56 lines (46 loc) · 1.43 KB
/
CricinfoSystem.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
using System.Collections.Generic;
namespace Cricinfo
{
public class CricinfoSystem
{
private readonly MatchService matchService;
private readonly ScorecardService scorecardService;
public CricinfoSystem()
{
matchService = MatchService.GetInstance();
scorecardService = ScorecardService.GetInstance();
}
public void AddMatch(Match match)
{
matchService.AddMatch(match);
}
public Match GetMatch(string matchId)
{
return matchService.GetMatch(matchId);
}
public List<Match> GetAllMatches()
{
return matchService.GetAllMatches();
}
public void UpdateMatchStatus(string matchId, MatchStatus status)
{
matchService.UpdateMatchStatus(matchId, status);
}
public void CreateScorecard(Match match)
{
scorecardService.CreateScorecard(match);
}
public Scorecard GetScorecard(string scorecardId)
{
return scorecardService.GetScorecard(scorecardId);
}
public void UpdateScore(string scorecardId, string teamId, int score)
{
scorecardService.UpdateScore(scorecardId, teamId, score);
}
public void AddInnings(string scorecardId, Innings innings)
{
scorecardService.AddInnings(scorecardId, innings);
}
}
}