@StatelessCode
  @StatelessCode
Stateless Code | Codecast: Create a RubyGem 72: Add Basic Highest and Lowest Patterns @StatelessCode | Uploaded October 2021 | Updated October 2024, 1 hour ago.
This is the 72nd video in the NerdDice create a RubyGem series. In this video Mike starts adding in the advantage (highest) and disadvantage (lowest). This video focuses on the specific use case of rolling 2 dice and keeping the larger or smaller with the pattern roll_dN_with_advantage. Examples of the pattern:

roll_d20_with_advantage
roll_d20_highest (same as with advantage)
roll_d20_with_disadvantage
roll_d20_lowest (same as with disadvantage)

This video covers:
00:00:12 Introduction
00:01:37 Start adapting the spec for the roll_dN_with_advantage pattern
00:04:41 Adapt the module-level regular expression to make the first spec pass
00:05:39 Adapt the module-level regular expression to make the first spec pass
00:05:39 Write implement the pattern and get most of specs passing
00:08:49 Troubleshoot remaining spec failures in console and re-write specs to test for the problem in a different way
00:14:30 Adapt specs to for _highest use case
00:16:56 Modify ConvenienceMethods to give _highest the same behavior as _with_advantage
00:17:54 Adapt specs to for _with_disadvantage and _lowest use cases
00:21:08 Implement _with_disadvantage and _lowest together
00:24:30 Remediate RuboCop violations
00:25:52 Commit, push, 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 72: Add Basic Highest and Lowest PatternsCodecast: Create a RubyGem 81: Refactor ConvenienceMethods - Part 3NerdDice.com Retrospective 4 - It is a Long Way DownCodecast: Create a RubyGem 54: Write roll_ability_scores Spec and MethodCreate a RubyGem 93: Refactor RuboCop to Enable New Cops by Default for the GemCodecast: Create a RubyGem 63: Create 0.3.x Stable Branch and Prune Old BranchesCodecast: Create a RubyGem 88: Add Ruby 3.1 to GitHub Actions and Update BundleGet Devise Working with Turbo in Rails 7Codecast: Getting Started with Rails 7 26: Fix Rich Text Fixtures and ValidationsInstall Ubuntu 24.04 LTS DesktopMediocre Karaoke - Dust in the Wind by KansasCodecast: Create a RubyGem 86: Retro on Version 0.4.0 (Now with Mediocre Karaoke)

Codecast: Create a RubyGem 72: Add Basic Highest and Lowest Patterns @StatelessCode

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER