Project URL: https://a-totally-lovely-trick-or-treat.glitch.me/
This is a simple demo featuring my code for a random number:
function random(max, useCorrect) {
if (useCorrect == null || useCorrect == undefined || useCorrect == false) {
return Math.floor(Math.random() * max);
} else {
return Math.floor(Math.random() * max) + 1;
}
}
then use it like
random(10, true) // can range from 1 - 10
random(10) // can range from 0 - 9
Simply click on one of the buttons. It also has random house colors, a bit of candy thrown in, and random endings!
It’s open source, too.
Blue will always have a special touch to it
4 Likes
Nice! I should try adding a random color to my colors API.
2 Likes
I bet the random house colors got ya to do that
but blue should be gradient
Oh lol I didn’t see blue yet. I liked the random messages though haha.
2 Likes
ooh, nice. electric blue window haha
2 Likes
Well, have fun candy hunting!
and seeing the “You died!” alert
What is this trick or treat? is it a festival?
It’s a United States holiday where kids can dress up in a spooky costume and “trick or treat”
So, they simply go up to a house, knock on the door, and get candy. Without saying a word. Quite cool, right?
5 Likes
Actually, people say “Trick or Treat!”
4 Likes
Lol, sometimes though people don’t say a word
5 Likes
system
Closed
18
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.