Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualK1NNY

Posted 12 October 2012 - 11:21 AM

This was an accidental post and i cant delete it.

#1K1NNY

Posted 12 October 2012 - 11:19 AM

It is possible that it is always going to the second while loop because of this:

[source lang="python"]if p < 15 and y == 1: game = False elect_new = True[/source]
(There is a weird glitch with this code block, if i use "p <= 15" it fails to display so assume it is "p <= 15" instead of "p < 15")


Is this code supposed to be evaluated every loop iteration?
What is the initial value of p? This code is evaluated every iteration and if p is initialized as <= 15 then this will evaluate true almost immediately because y is determined by:
[source lang="python"]y = random.randint(1, 3)[/source]
Which is also evaluated every loop and because the loop time is really fast, as in < 10ms (this may be faster because you have no sleep/fps timing), y will be 1 in about 3-4 loops. so it would take about 30-40ms to evaluate true and jump to the second loop.


PARTNERS