コード例 #1
0
 public GameService(IPlayParser playReader, GameRepo gameRepo, PlayerRepo playerRepo, IUserService userRepo, IPlayService playerService)
 {
     _gameRepo     = gameRepo;
     _playerRepo   = playerRepo;
     _userRepo     = userRepo;
     _playReader   = playReader;
     _playsService = playerService;
 }
コード例 #2
0
        public void Setup()
        {
            playParser = new PlayParser();
            gameId     = Guid.NewGuid();
            playerIds  = new List <Guid>
            {
                Guid.NewGuid(), Guid.NewGuid(), Guid.NewGuid(), Guid.NewGuid()
            };
            //P0 + P1 - teamA, P2 + P3 - teamB
            P0Makes2pFG  = new PlayDTO("fieldgoal", false, playerIds[0], true, 2);
            P1Assists    = new PlayDTO("assist", false, playerIds[1]);
            P0Misses2pFG = new PlayDTO("Fieldgoal", false, playerIds[0], false, 2);
            P0Makes3pFG  = new PlayDTO("fieldgoal", false, playerIds[0], true, 3);
            P0Misses3pFG = new PlayDTO("Fieldgoal", false, playerIds[0], false, 3);

            P1Rebounds_SameTeam = new PlayDTO("rebound", false, playerIds[1]);
            P2Rebounds_DiffTeam = new PlayDTO("Rebound", true, playerIds[2]);
            P2Blocked           = new PlayDTO("block", true, playerIds[2]);
            P0LostTheBall       = new PlayDTO("Turnover", false, playerIds[0]);
            P2StoleTheBall      = new PlayDTO("steal", true, playerIds[2]);
            P0SubbedOut         = new PlayDTO("substitution", false, playerIds[0], true);
            P1SubbedIn          = new PlayDTO("substitution", false, playerIds[1], false);
        }