Stateless Code | Codecast: Create a RubyGem 71: Implement Remaining Bonus and Penalty Patterns @StatelessCode | Uploaded October 2021 | Updated October 2024, 29 minutes ago.
This is the 71st video in the NerdDice create a RubyGem series. In this video Mike takes the working roll_NdN_plusN pattern from the previous video and adapts it to the remaining bonus and penalty patterns for the ConvenienceMethods module.
New roll_ paterns (returns DiceSet):
roll_1d20_p_6 (equivalent to roll_1d20_plus_6)
roll_1d20_minus_6
roll_1d20_m_6 (equivalent to roll_1d20_minus_6)
New total_ patterns (returns Integer):
total_1d20_plus_6
total_1d20_p_6 (equivalent to roll_1d20_plus_6)
total_1d20_minus_6
total_1d20_m_6 (equivalent to roll_1d20_minus_6)
This video covers:
00:00:12 Introduction
00:01:10 Write failing specs roll_NdN_p_N pattern as shorter equivalent to plus
00:04:13 Implement roll_NdN_p_N pattern, commit push
00:06:23 Adapt for roll_NdN_minus_N pattern
00:12:14 Adapt for roll_NdN_m_N pattern. (This works so just amend the previous commit and push)
00:14:07 Reset the stage after video pause issue
00:15:07 Adapt roll_ specs to the total_ pattern with failing specs
00:17:11 Modify ConvenienceMethods module to make the specs for total_ pass
00:19:38 Remediate RuboCop violations temporarily by using enable and disable. Add backlog item to refactor.
00:23:37 Commit, push and update backlog
This video is CC0 - No rights reserved. (YouTube doesn't allow this option when publishing.) All code is released under the UNLICENSE. Stateless Code denies the concept of "intellectual property". Copying is not stealing.
This is the 71st video in the NerdDice create a RubyGem series. In this video Mike takes the working roll_NdN_plusN pattern from the previous video and adapts it to the remaining bonus and penalty patterns for the ConvenienceMethods module.
New roll_ paterns (returns DiceSet):
roll_1d20_p_6 (equivalent to roll_1d20_plus_6)
roll_1d20_minus_6
roll_1d20_m_6 (equivalent to roll_1d20_minus_6)
New total_ patterns (returns Integer):
total_1d20_plus_6
total_1d20_p_6 (equivalent to roll_1d20_plus_6)
total_1d20_minus_6
total_1d20_m_6 (equivalent to roll_1d20_minus_6)
This video covers:
00:00:12 Introduction
00:01:10 Write failing specs roll_NdN_p_N pattern as shorter equivalent to plus
00:04:13 Implement roll_NdN_p_N pattern, commit push
00:06:23 Adapt for roll_NdN_minus_N pattern
00:12:14 Adapt for roll_NdN_m_N pattern. (This works so just amend the previous commit and push)
00:14:07 Reset the stage after video pause issue
00:15:07 Adapt roll_ specs to the total_ pattern with failing specs
00:17:11 Modify ConvenienceMethods module to make the specs for total_ pass
00:19:38 Remediate RuboCop violations temporarily by using enable and disable. Add backlog item to refactor.
00:23:37 Commit, push and update backlog
This video is CC0 - No rights reserved. (YouTube doesn't allow this option when publishing.) All code is released under the UNLICENSE. Stateless Code denies the concept of "intellectual property". Copying is not stealing.