checkWheel static method

LuckyConformanceReport checkWheel(
  1. WheelConfig config, {
  2. Size size = _defaultSize,
  3. List<int>? indices,
})

实验性(可能调整):用 config、size 检查 indices 的结果与指针落点,返回报告。

wheel 仅支持按钮命中,跳过奖品命中检查;随机停止偏移使用固定种子。 例如 LuckyConformance.checkWheel(config, indices: [0]);参数规则见类注释。

Implementation

static LuckyConformanceReport checkWheel(WheelConfig config,
    {Size size = _defaultSize, List<int>? indices}) {
  final controller = WheelController(random: math.Random(0));
  return _check(
      'wheel',
      config,
      const WheelGame(),
      controller,
      controller.stop,
      [for (final prize in config.prizes) prize.disabled],
      size,
      indices,
      (layout, frame) => [frame.pointerIndex]);
}