Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibly unexpected slot machine display #114

Open
YuevUwU opened this issue Aug 23, 2024 · 2 comments
Open

Possibly unexpected slot machine display #114

YuevUwU opened this issue Aug 23, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@YuevUwU
Copy link
Contributor

YuevUwU commented Aug 23, 2024

問題說明 Describe the feature
當前老虎機顯示採用10個圖標的循環圖,根據代碼可能有潛在未預期的抽選(只影響顯示)

  • randomSlot() 僅會生成 1-9 的可能 (all different or one pair)
  • all same 事件只會產生 0-8 的可能( 根據 Math.random()∊[0,1) )
  • all same 事件可能與lightning有相同結果,造成明明 ⚡ ⚡ ⚡ 卻不值 50 電電點

(此issue僅從 templates/slot.html 分析,可能有其他機制避免或此為預期,如有錯誤,在此先行道歉)

The current slot machine display uses an image of 10 icons cyclically.
Depending on the code, there may be potentially unexpected draws (only affects the display).

  • randomSlot() will only generate possibilities 1-9 during all different and one pair
  • Will only produce 0-8 possibilities during all same (according to Math.random()∊[0,1) )
  • May have the same result as lightning during all same, even if get ⚡ ⚡ ⚡ but it doesn't worth 50 :zap~1:

(This issue is only analyzed from templates/slot.html. There may be other mechanisms to avoid this or this is expected. If I made any mistake, I apologize first)

Expected behavior

  • 在 slot.png 的圖標都能正常顯示 The icons in slot.png can be displayed normally
  • ⚡ ⚡ ⚡ 僅存在於lightning發生時 ⚡ ⚡ ⚡ only exists during lightning
@YuevUwU YuevUwU added the bug Something isn't working label Aug 23, 2024
@YuevUwU YuevUwU changed the title [enhancement] Possibly Unexpected Slot Machine Display Possibly Unexpected Slot Machine Display Aug 23, 2024
@Edit-Mr
Copy link
Member

Edit-Mr commented Aug 23, 2024

又 assign 給我,莫名其妙(

@winstonsung
Copy link
Collaborator

噢,按到了。

@winstonsung winstonsung changed the title Possibly Unexpected Slot Machine Display Possibly unexpected slot machine display Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants