Beispiel #1
0
        public AI(IGameBoardRepository gameBoardRepository, IPlayerReposytory playerReposytory, IGameBoard board)
        {
            _gameBoardRepository = gameBoardRepository;
            _playerRepository    = playerReposytory;
            _gameBoard           = board;

            //_playerX = _playerRepository.LoadNewPlayerList()[0];
            //_playerO = _playerRepository.LoadNewPlayerList()[1];
            _winConstellations = new int[8, 3]
            {
                { 0, 1, 2 }, /* +---+---+---+*/
                { 3, 4, 5 }, /* | 0 | 1 | 2 |*/
                { 6, 7, 8 }, /* +---+---+---+*/
                { 0, 3, 6 }, /* | 3 | 4 | 5 |*/
                { 1, 4, 7 }, /* +---+---+---+*/
                { 2, 5, 8 }, /* | 6 | 7 | 8 |*/
                { 0, 4, 8 }, /* +---+---+---+*/
                { 2, 4, 6 },
            };

            //_boardAreaFineValues = new int[9]
            //{
            //    3, 2, 3,
            //    2, 4, 2,
            //    3, 2, 3
            //};
        }
Beispiel #2
0
 public FriendsService(
     IGameBoardRepository repository,
     INotificationService notificationService,
     IGroupsService groupsService,
     IOptions <GroupsConfiguration> groupsOptions)
 {
     _repository          = repository;
     _notificationService = notificationService;
     _groupsService       = groupsService;
     _groupsOptions       = groupsOptions.Value;
 }
Beispiel #3
0
 public GameBoard(IGameBoardRepository gameBoardRepository)
 {
     _gameBoardRepository = gameBoardRepository ?? throw new ArgumentNullException(nameof(gameBoardRepository));
     _gameBoardAreaList   = _gameBoardRepository.LoadNewGameBoard();
     _winConstellations   = new int[8, 3]
     {
         { 0, 1, 2 }, /*  +---+---+---+  */
         { 3, 4, 5 }, /*  | 0 | 1 | 2 |  */
         { 6, 7, 8 }, /*  +---+---+---+  */
         { 0, 3, 6 }, /*  | 3 | 4 | 5 |  */
         { 1, 4, 7 }, /*  +---+---+---+  */
         { 2, 5, 8 }, /*  | 6 | 7 | 8 |  */
         { 0, 4, 8 }, /*  +---+---+---+  */
         { 2, 4, 6 },
     };
 }
Beispiel #4
0
 public GroupsService(IGameBoardRepository repository)
 {
     _repository = repository;
 }
Beispiel #5
0
 public GameBoardController(IGameBoardRepository gameBoard,
                            ILogHelper logHelper)
 {
     _gameBoard = gameBoard;
     _logHelper = logHelper;
 }
Beispiel #6
0
 public GameBoardController(IGameBoardRepository gameBoardRepository)
 {
     this.gameBoardRepository = gameBoardRepository;
 }
 public DescriptionTabService(IGameBoardRepository repository)
 {
     _repository = repository;
 }
 public GameController(IGameBoardRepository gameBoardRepository)
 {
     _gameBoardRepository = gameBoardRepository;
 }
Beispiel #9
0
 public GameEventParticipationService(IGameBoardRepository repository, INotificationService notificationService)
 {
     _repository          = repository;
     _notificationService = notificationService;
 }
Beispiel #10
0
 public UserSearchService(IGameBoardRepository repository, IFriendsService friendsService)
 {
     _repository     = repository;
     _friendsService = friendsService;
 }
 public GetGameSettingsQueryHandler(IGameBoardRepository _gameBoardRepository, ITurtleRepository _turtleRepository, IMapper _mapper)
 {
     mapper = _mapper;
     gameBoardRepository = _gameBoardRepository;
     turtleRepository    = _turtleRepository;
 }
Beispiel #12
0
 public GameEventService(IGameBoardRepository repository)
 {
     _repository = repository;
 }
 public GameEventReminderService(IGameBoardRepository repository, INotificationService notificationService)
 {
     _repository          = repository;
     _notificationService = notificationService;
 }