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

ダイス面数の上限を 10,000 に増加 #544

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/bcdice/randomizer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module BCDice
# 乱数生成器
class Randomizer
UPPER_LIMIT_DICE_TIMES = 200
UPPER_LIMIT_DICE_SIDES = 1000
UPPER_LIMIT_DICE_SIDES = 10000

UPPER_LIMIT_RANDS = 10000

Expand Down
4 changes: 2 additions & 2 deletions test/test_randomizer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ def setup

# ダイス面数が上限ぎりぎり
def test_upper_limit_sides
assert_not_equal(0, @randomizer.roll_once(1000))
assert_not_equal(0, @randomizer.roll_once(10000))
end

# ダイス面数が上限超え
def test_over_upper_limit_sides
assert_equal(0, @randomizer.roll_once(1001))
assert_equal(0, @randomizer.roll_once(10001))
end

# ダイス個数が上限ぎりぎり
Expand Down