Closed Mesure73L closed 7 months ago
You didn't need to create a new PR when you chose the wrong base, you can just edit it
Oh, okay, I didn't know that. Thank you!
Oh, okay, I didn't know that. Thank you!
I didn't either, I thought I would have to make a new one but I clicked edit to see if I could change it and I could, it's good to know for the future I guess
Name | Link |
---|---|
Latest commit | 5a8e027a6b7e2a19fcfc9a429bf48c5c8b1ef9a8 |
Latest deploy log | https://app.netlify.com/sites/m73l-twelve-of-code-dev/deploys/65e8aa5df7a6820008d6d753 |
Deploy Preview | https://deploy-preview-157--m73l-twelve-of-code-dev.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Remember, you only need to use the code for the GET
request.
I found how to make it so you can do /api/seed?data=
. Would you like me to do that for you?
Remember, you only need to use the code for the
GET
request. I found how to make it so you can do/api/seed?data=
. Would you like me to do that for you?
Sure
Given: An array of chip brands. For example, ["fritos", "lays", "doritos", "mommas"]
. The set of chip brands you are given has exactly half the cardinality of the master set, and is a subset of the master set. It is based on your seed.
Given: The name of one chip brand in that array. It is based on your seed.
Process: Put that chip brand into the API. The API returns the name of another chip brand, based on your seed. The API returns the "owner" of that chip brand, in a fictional context. For example, if calling the API with input "lays"
returns "fritos"
, it means that Fritos has bought Lays. (This is a purely fictional context, I am aware that Lays owns Fritos.)
Find: The number of master brands in that streak. For example, if your input you are given is "lays"
, and your array is ["fritos", "lays", "doritos", "mommas"]
, the API could return "fritos"
. Then, "fritos"
could return "doritos"
, then "mommas"
, then "doritos"
, and it continues to loop. Therefore, the number of master brands that own each is 2, as your final loop for the starting brand is 2.
You may start development on the challenge using JavaScript only, but do not use PHP yet, as I have not yet set that up. In addition, I am going to create a SeedManager
class later today, which will generate pseudorandom numbers based on the seed.
@Mesure73L Is that good for you?
I do not understand.
Please be very specific, including how the seed affects how the program works.
[!WARNING] Spoilers
and what JavaScript do I need to make?????????
What do you need to be more specific?
I did say how the seed affects it. The seed affects
The set of chip brands you are given has exactly half the cardinality of the master set, and is a subset of the master set. It is based on your seed.
a) What the array of chip brands is. b) What your starting chip brand is. c) What the API returns for any given chip brand.
I did say how the seed affects it. The seed affects
The set of chip brands you are given has exactly half the cardinality of the master set, and is a subset of the master set. It is based on your seed.
a) What the array of chip brands is. b) What your starting chip brand is. c) What the API returns for any given chip brand.
How does the seed specifically affect how it works, like what is the seed formula?
I don't understand what you are asking for. Can you please be more specific?
What "seed formula?" There is no formula involved.
Okay, so this is what you need to do:
SeedManager
class, randomly select three quarters of the big array to create a new array.SeedManager
class, randomly select one string from the user's input. This is their starting value. It is also given to them on the 12oC website.What I meant by doing the JavaScript is doing steps 1-4.
Ok 👍 I'll ask if I need any help (probably will)
@BeepBot99 Please do not make duplicates
How many brands do I need?
I only have 51 brands, I don't think that will be enough.
We need something else besides chips. Maybe add candies?
How about salsa?
Yes, I'll add that
Done, merged.
Could we add hot sauce too?
Sure! Also, you can do sour cream if you want. How many total brands do you want?
Wait actually no, let's do nacho toppings only.
But sure, if you want to, you can add whatever you want. You're making the challenge, not me. Just tell me if you need any help.
How many total brands do you want?
Enough to make it really time consuming to try to do the challenge manually
Wait actually no, let's do nacho toppings only.
Can you give me some other things that I could add?
Tomatoes, cheese, guacamole, refried beans, etc.
Nice.
@BeepBot99 Please answer #166.
@BeepBot99 Can you make the challenge iframe look better?
@BeepBot99 Please answer #166.
Done.
@BeepBot99 Can you make the challenge iframe look better?
What do you mean by that?
@BeepBot99 Can you make the challenge iframe look better?
I think putting it in a modal that takes up 90% of the width of the screen would look better. Do I have permission to do that in this branch, or should I do it in another branch?
This is a draft, I was not ready for it to be reviewed yet. You can try the modal thing but I might not accept it.
This is a draft, I was not ready for it to be reviewed yet. You can try the modal thing but I might not accept it.
I know, I just wanted to let you know now because it is best changed early on, before you make it dynamic.
This is a draft, I was not ready for it to be reviewed yet. You can try the modal thing but I might not accept it.
I know, I just wanted to let you know now because it is best changed early on, before you make it dynamic.
Then just say that without requesting changes. You requested me to not review it while it was a draft, so do the same yourself.
No, I am fine with you reviewing it while it is a draft, and I will continue to review it. I didn't like when you merged it as a draft.
No, I am fine with you reviewing it while it is a draft, and I will continue to review it. I didn't like when you merged it as a draft.
No, one time I reviewed it while it was a draft and you didn't like that.
Thank you for making that.
You're welcome, no problem.
One question:
How do I fix this returning undefined
?
let randomValues2024mar1 = [];
for (i = 0; i > Math.floor(nachoToppingBrands.length / 4 * 3); i++) {
randomValues2024mar1.push(`randomValue${i}`);
}
const sman2024mar1 = new SeedManager(window.parent.seed, randomValues2024mar1);
alert(sman2024mar1.randomValue2);
Try alerting randomValues2024mar1
right before that alert to make sure it exists.
First alert:
Second alert:
Okay, so first make sure your array has stuff in it. That's your problem, not mine.
Resolves twelve-of-code-official/challenges#2