public Data(int key, InfoRandomizer.DB_Male dbMale, InfoRandomizer.DB_Female dbFemale) { infoRandomizer = new InfoRandomizer(dbMale, dbFemale); cardID = $"{infoRandomizer.GetRandomizeCardID(GameConfiguration.minCardID, GameConfiguration.maxCardID)}{key}"; firstName = infoRandomizer.GetRandomizeFirstName(infoRandomizer.GetRandomizeGender()); middleName = infoRandomizer.GetRandomizeMiddleName(infoRandomizer.GetRandomizeGender()); lastName = infoRandomizer.GetRandomizeLastName(infoRandomizer.GetRandomizeGender()); }
private Card GenerateCard() { // Generate card info int generatedPrimaryKey = infoRandomizer.RandomNumber(100, 500); string cardID = $"{infoRandomizer.GetRandomizeCardID(GameConfiguration.minCardID, GameConfiguration.maxCardID)}{generatedPrimaryKey}"; DateTime dateTimeFrom = GameConfiguration.gameTime.AddDays(-GameConfiguration.generatedRangeCardDate); DateTime dateTimeTo = GameConfiguration.gameTime.AddDays(GameConfiguration.generatedRangeCardDate); // HARDCODED CREATED CARD DATE TIME DateTime dateCreated = GameConfiguration.gameTime.AddDays(-5); DateTime dateExpired = infoRandomizer.GetRandomDate(dateTimeFrom, dateTimeTo); return(new Card(firstName, middleName, lastName, genderType, cardID, dateCreated, dateExpired)); }