Quote:
Originally Posted by Skyld
Interesting, although I feel randomstring(array); might be a bit more useful here (should avoid index stuff):
Something like:
PHP Code:
function calculate() { this.random = randomstring(this.alphabet);
if (this.random != this.random_last) { this.random_last = temp.letter;
container_game_text.text = format("Press '%s'", this.random); container_game_text.x = 135; } else { this.calculate(); } }
|
Ah, I didn't know about this command. Either way, is there really a major difference?
Quote:
Originally Posted by Skyld
Also, while it's probably nice that you've tried to demonstrate this, it's a bit misleading and probably not that efficient either, since you are running a check twice:
PHP Code:
if (this.container_on ? "On" : "Off" == "On")
Perhaps changing it to standard true/ false values and using:
PHP Code:
if (this.container_on)
|
Yeah, I know. I was just wondering the different ways of using those conditional statements and found that you can do conditional if statements with them.
PHP Code:
if (this.container_on)
{
//
}
or
PHP Code:
if (this.container_on == true)
{
//
}
Both would have been better alternatives, I know.
