|
|
你玩家眼里能看到的,
& W( U% r: m. s' ?0 z不是它生成的原始随机数(32位整数)," {3 V2 @! ]+ Q* Y
而是处理后的最终结果 —比如:牌点数 1~9、庄/闲结果
# b% @; b( O& d/ x1 w7 a; `import random
* f" L# W0 ?; a3 x& t' A, V- }random.seed(123456)
& J; q- R: X0 k# r1 ]rand_val = random.getrandbits(32) #
' n" p, K. a0 n. B z" Lcard = rand_val % 9 + 1 #
' P& _0 ^$ X3 [& n, W- M' P5 W! o p |
|