-
Notifications
You must be signed in to change notification settings - Fork 192
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
新クトゥルフ神話TRPGでTens D10を先に振るようにする #267
Conversation
結果ダイスを画像で表示させた時に十の位のダイスが先にある方が 視認しやすいため、Tens D10を先に実行する。
Codecov Report
@@ Coverage Diff @@
## master #267 +/- ##
==========================================
- Coverage 87.88% 87.88% -0.01%
==========================================
Files 225 225
Lines 22905 22902 -3
==========================================
- Hits 20131 20128 -3
Misses 2774 2774
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
処理内容は問題ないと思います。細かい点ですが、ご確認お願いします。
src/diceBot/Cthulhu7th.rb
Outdated
dice_list = tens_list.map { |tens| tens + ones } | ||
dice_list.map! { |dice| dice == 0 ? 100 : dice } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
連続で map
しているので、ひとつにまとめられないでしょうか?
dice_list = tens_list.map { |tens| tens + ones } | |
dice_list.map! { |dice| dice == 0 ? 100 : dice } | |
dice_list = tens_list.map { |tens| | |
dice = tens + ones | |
dice == 0 ? 100 : dice | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mapの中で複数のことをやると読みづらいだろう思って分割していましたが、大丈夫そうなのでまとめました
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
新クトゥルフ神話TRPGでTens D10を先に振るようにする
ボーナスダイス処理時に今までは一の位を先にダイスロールしていた。
しかし、結果ダイスを画像で表示させた時に十の位のダイスが先にある方が視認しやすいため、Tens D10を先に実行する。