@StatelessCode
  @StatelessCode
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.
Codecast: Create a RubyGem 71: Implement Remaining Bonus and Penalty PatternsCodecast: Create a RubyGem 78: Allow Advantage and Bonus CombinationsGive Yourself OptionsCodecast: statelesscode.com WordPress 16: Move the Footer Widget Back to the FooterExploring My Table Top Role-Playing User PersonaCreate a RubyGem 89: Add Ruby 3.2 to GitHub Actions and Update RSpec to a compatible versionAdd UUID Support and Generate the Devise User ModelMigrate from SFDX CLI version 7.x to Salesforce CLI version 2.xAdd Code Climate to Project and Allow for Browser Test Driver OptionsInstall Windows Subsystem for Linux 2 (WSL2) and Set Up Remote Development for Visual Studio CodeCodecast: Getting Started with Rails 7 10: Destroy an Article and Get it Working with TurboCreate a RubyGem 94: Fix a Cognitive Complexity Code Smell from Code Climate

Codecast: Create a RubyGem 71: Implement Remaining Bonus and Penalty Patterns @StatelessCode

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER