Actually might be 1 and a million
Same here as well
Actually might be 1 and a million
Same here as well
Tell me if you think this might be a million
Take a pic
Fun!
Both games would average out to one chance in a million to win, yes. For the first one, you’re nesting three 1% chance
conditions. That’s 1/100 x 1/100 x 1/100, which is 1/1,000,000.
For the second one, you’re pulling numbers that range between 1 and 1,000,000. There is roughly[1] one chance in a million to pull any single number, so, yes, there is one chance in a million that the numbers will match.
For the first game, you could simplify the logic a little bit:
For the second game, you’re only interested in comparing the two numbers when value2
changes, so you don’t need that comparison in the on game update
loop. You only need to check when value2
changes:
Nice work! That was a lot of fun! No, I didn’t win in either game.
[1] For those who dig a little deeper, MakeCode Arcade, I believe, relies on JavaScript’s math.random()
function which, according to Mozilla, is a pseudo-random generator that approximates uniform distribution: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random
Thanks @AlexK! The changes in the game sound better. I’m someone who is usually on the safe side. I tried making a 1 in a million game about in July I believe. Thanks for the feedback! I feel like I’m over doing it but thanks for simplifying it!
Honestly like short games with short code or long games with long code
Is the first game a template?
No its the game. Press and hold A to roll and the chances of getting to it is actually 1/1000000
I have a messy desk, and happened to have the necessary parts for a test jig at hand. I’ll let you know how long it takes:
Jeff
That is the best thing ever! How long do you plan on running that for?
I left it running while I left my office for a bit, and over the course of about an hour, it had tried 15,778 tries without a win. I do need my computer again before the day is out, though, so I stopped it. As fun as mechanical testing is, I think automated testing in software will probably be faster
Jeff
Yeah, automated testing will usually be a bit faster If anyone wants to run it in dev tools, under the
---simulator
:
const board = pxsim.board();
let on = true;
setInterval(() => {
board.setButton(5 /** A **/, on);
on = !on;
}, 10 /** ms **/);
(just a general note for anyone reading, note that running things in dev tools can be a safety concern if you’re e.g. running something on a site with a log in - it’s best to avoid running any code you do not understand / you didn’t write yourself there / just be cautious in general that you aren’t sending your data to someone or anything of the sort.)
Man everyone is looking for (well I don’t want to say cheats) new ideas to beat this game.
But seriously, I don’t know javascript or python but that is cool!
Big Brains!! I’m not against your javascript but robotics or javascript is a good way to put it.
Here is the problem with both of your ideas @jwunderl and @FlyingFox, when you spam A, who knows when you will win? Then there is the part where you do win but never get to see the victory
Ah good point, here’s a version that will rain confetti and say you win when it’s over without restarting:
That solves the A button problem
Have you been leaving it on all night
Question: Does it delete the number you roll after you roll it so you get a higher chance of winning as you go on?