예제 #1
0
        public void Invoke(IGames ser)
        {
            Console.WriteLine("Delete player");
            int index = Menu.IndexGames();

            ser.DeletePlayer(index);
        }
예제 #2
0
 public CreateVillage(IGames game, Panel drawing_panel, System.Windows.Forms.Label village_name, string sVillageName)
 {
     this.game          = game;
     this.village_name  = village_name;
     this.drawing_panel = drawing_panel;
     this.sVillageName  = sVillageName;
 }
예제 #3
0
        public void Invoke(IGames ser)
        {
            Console.Write("Add city of the game: ");
            string city = Validator.validator_name(Console.ReadLine());

            ser.AddPlaceofGame(city);
        }
예제 #4
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     this.EventRegistrations = new EventRegistrations(this);
     this.Events             = new Events(this);
     this.Games            = new Games(this);
     this.BaseUri          = new Uri("http://gameplannerapi.azurewebsites.net");
     SerializationSettings = new JsonSerializerSettings
     {
         Formatting            = Formatting.Indented,
         DateFormatHandling    = DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = DateTimeZoneHandling.Utc,
         NullValueHandling     = NullValueHandling.Ignore,
         ReferenceLoopHandling = ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = DateTimeZoneHandling.Utc,
         NullValueHandling     = NullValueHandling.Ignore,
         ReferenceLoopHandling = ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
 }
예제 #5
0
        public void Invoke(IGames ser)
        {
            Console.WriteLine("Sort for 4 part");
            int index = Menu.IndexGames();

            ser.SortFour(index);
        }
예제 #6
0
        public void Invoke(IGames ser)
        {
            int index = Menu.IndexGames();

            Console.Write("Delete game: ");
            ser.Delete(index);
        }
예제 #7
0
        public void Invoke(IGames ser)
        {
            Console.Write("Name of the game: ");
            var name = Validator.validator_name(Console.ReadLine());

            ser.Add(name);
        }
예제 #8
0
        public void Invoke(IGames ser)
        {
            Console.Write("Add day of the game: ");
            var day = Validator.validator_day(Console.ReadLine());

            ser.AddTimeofGame(Convert.ToInt32(day));
        }
        public void Invoke(IGames ser)
        {
            Console.WriteLine("Change count of game");
            int index = Menu.IndexGames();

            ser.ChangeCountOfGame(index);
        }
예제 #10
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Game> GetGameAsync(this IGames operations, int id, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetGameWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 public ExchangesService(IUserProfiles userProfiles, IExchanges exchanges, IUnitOfWork unitOfWork, IGames games, MappingService mappingService)
 {
     this.userProfiles   = userProfiles;
     this.exchanges      = exchanges;
     this.unitOfWork     = unitOfWork;
     this.games          = games;
     this.mappingService = mappingService;
 }
예제 #12
0
 public UserSearchesService(IGames games, IUserSearches userSearches, IUserProfiles userProfiles, IUnitOfWork unitOfWork, MappingService mappingService)
 {
     this.games          = games;
     this.userSearches   = userSearches;
     this.userProfiles   = userProfiles;
     this.unitOfWork     = unitOfWork;
     this.mappingService = mappingService;
 }
        public void Invoke(IGames ser)
        {
            Console.WriteLine("Count of visitors < 100");
            Console.Write("Add count of visitors: ");
            var visitors = Validator.validator_countplace(Console.ReadLine());

            ser.AddCountofVisitors(Convert.ToInt32(visitors));
        }
예제 #14
0
 public void Invoke(IGames ser)
 {
     Console.WriteLine("Write day of the game");
     foreach (var a in ser.SearchGame(Convert.ToInt32(Console.ReadLine())))
     {
         Console.WriteLine(a);
     }
     Console.ReadKey();
 }
예제 #15
0
        public OpenVillage(IGames game, Label villageNameLabel, string selectedNation, Graphics graphics, Pen pen)
        {
            this.game             = game;
            this.villageNameLabel = villageNameLabel;
            this.selectedNation   = selectedNation;

            this.graphics = graphics;
            this.pen      = pen;
        }
예제 #16
0
        public void Invoke(IGames ser)
        {
            Console.WriteLine("Change place of game");
            int index = Menu.IndexGames();

            Console.WriteLine("Add new city of game");
            string city = Validator.validator_name(Console.ReadLine());

            ser.ChangePlaceOfGame(city, index);
        }
        public void Invoke(IGames ser)
        {
            Console.WriteLine("Change day of game");
            int index = Menu.IndexGames();

            Console.WriteLine("Add new time of game");
            var data = Validator.validator_day(Console.ReadLine());

            ser.ChangeTimeOfGame(Convert.ToInt32(data), index);
        }
예제 #18
0
        public void Invoke(IGames ser)
        {
            Console.WriteLine("Change name of game");
            int index = Menu.IndexGames();

            Console.WriteLine("Add new name of game");
            string name = Validator.validator_name(Console.ReadLine());

            ser.Change(name, index);
        }
        public void Invoke(IGames ser)
        {
            Console.WriteLine("Change count of visitors");
            int index = Menu.IndexGames();

            Console.WriteLine("Add new count of visitors");
            var newvisitors = Validator.validator_countplace(Console.ReadLine());

            ser.ChangeCountOfVisitors(index, Convert.ToInt32(newvisitors));
        }
예제 #20
0
 internal BetProcess(IResponseService responseService,
                     IExceptionHandler exceptionHandler,
                     IGames gameService,
                     IBets betsService
                     )
 {
     _responseService  = responseService;
     _exceptionHandler = exceptionHandler;
     _gameService      = gameService;
     _betsService      = betsService;
 }
예제 #21
0
        public void Invoke(IGames ser)
        {
            Console.WriteLine("Add player");
            int index = Menu.IndexGames();

            Console.Write("Add name of player: ");
            string name = Validator.validator_name(Console.ReadLine());

            Console.WriteLine("Add surname of player");
            string surname = Validator.validator_name(Console.ReadLine());

            ser.AddPlayer(name, surname, index);
        }
예제 #22
0
 public BetController(IValidator <Bet> entityValidator,
                      IResponseService responseService,
                      IExceptionHandler exceptionHandler,
                      IGames gameService,
                      IBets betsService)
 {
     _entityValidator  = entityValidator;
     _responseService  = responseService;
     _exceptionHandler = exceptionHandler;
     _gameService      = gameService;
     _betsService      = betsService;
     _betProcess       = new BetProcess(_responseService, _exceptionHandler, _gameService, _betsService);
 }
예제 #23
0
        private void Save_Village(object sender, EventArgs e)
        {
            if (inputValidation.checkStringInput(village_name_label.Text))
            {
                MessageBox.Show(DefaultValue.saving_invalid_message);
                return;
            }

            game = gameFactory.getGame();
            IGameControlCommand onCommand      = commandFactory.GetGameControlCommand(DefaultValue.SAVE_KEY, game, village_name_label.Text, gameState);
            GameKeyInvoker      gameKeyInvoker = new GameKeyInvoker(onCommand);

            gameKeyInvoker.click();
        }
예제 #24
0
        static GameReaderUnitTest()
        {
            logFileReader = new GamesLogFileReader(logFilePath);

            gamesReader = logFileReader.Reader();

            using (var uow = new UnitOfWork(new QuakeContext()))
            {
                uow.Current().Database.ExecuteSqlCommand("DELETE FROM Game;");

                gamesRepository = new Games(uow);
                gamesRepository.Save(gamesReader);
            }
        }
예제 #25
0
 /// <summary>
 /// Creates a new instance with the wrapper.
 /// <para>If <see cref="TokenType"/> is group, the <see cref="Users"/> field will be of type <see cref="IUsers"/></para>
 /// <para>If <see cref="TokenType"/> is User, the <see cref="Users"/> field will be of type <see cref="IUserExtended"/></para>
 /// </summary>
 /// <param name="tokenType"></param>
 /// <param name="the100Token"></param>
 public The100API(TokenType tokenType, string the100Token)
 {
     _token                  = the100Token;
     _httpClient             = new HttpClient();
     _httpClient.BaseAddress = new Uri("https://www.the100.io/api/v2/");
     _httpClient.DefaultRequestHeaders.Add("Authorization", $"Token token\"{_token}\"");
     GamingSessions = new Endpoints.GamingSessions(_httpClient);
     Games          = new Endpoints.Games(_httpClient);
     Groups         = new Endpoints.Groups(_httpClient);
     if (tokenType == TokenType.Group)
     {
         Users = new Endpoints.Users(_httpClient);
     }
     else if (tokenType == TokenType.User)
     {
         Users = new Endpoints.UsersExtended(_httpClient);
     }
 }
예제 #26
0
        private void Open_village(object sender, EventArgs e)
        {
            if (inputValidation.checkStringInput(selectedNationforOpening))
            {
                environment = environmentFactory.getEnvironment(Nation_Name, bangladesh_Nation_radioButton, egypt_nation_radioButton, arab_nation_radioButton, inuit_nation_radioButton, Tree, House, WaterSource, g, DefaultValue.DEFAULT_NATION, DefaultValue.DEFAULT_COLOR);
                environment.setEnvironment();
                MessageBox.Show(DefaultValue.opening_invalid_message);
                return;
            }
            game = gameFactory.getGame();

            IGameControlCommand onCommand      = commandFactory.GetGameControlCommand(DefaultValue.OPEN_KEY, game, village_name_label, selectedNationforOpening, g, pen);
            GameKeyInvoker      gameKeyInvoker = new GameKeyInvoker(onCommand);

            gameState = gameKeyInvoker.click();

            drawnItemsInfosList = gameState.DrawnItemsInformationList;

            selectedNationforOpening = "";
        }
예제 #27
0
 public GamesController(IGames games) => this.games = games;
예제 #28
0
 public SuperNES(IGames game)
 {
     _game = game;
 }
예제 #29
0
 public GameController(IGames service) => _service = service;
예제 #30
0
 public void Invoke(IGames ser)
 {
     Console.WriteLine("Result of game");
     ser.AddCountofGame();
 }