|
|
你玩家眼里能看到的,! s8 b" W: F6 n) q( H: D1 ?
不是它生成的原始随机数(32位整数),
. c; L p" }: N* K, C而是处理后的最终结果 —比如:牌点数 1~9、庄/闲结果: u3 j- Y5 X; n W9 {) a
import random
, [. q8 n$ `2 _" y& ~random.seed(123456)# V# U0 t |+ T, @& s
rand_val = random.getrandbits(32) #
l8 x: f" P K7 h1 ]; e/ B3 Gcard = rand_val % 9 + 1 # 7 P9 c( @+ ?9 C
|
|