This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A trivial code for solving the Colossal Cue Adventure | |
# URL: http://adventure.cueup.com/ | |
# Level 1: The VAX's MTH$RANDOM % 36 Roulette | |
def vax_rng_next(x): | |
"""Generate the next pseudo-random number.""" | |
a, c, m = 69069, 1, 2**32 | |
return (a * x + c) % m |