Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
13 changes: 13 additions & 0 deletions TUTORIAL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Guide to Solving Dice Roll

When we look into our `dice-roll.rb` file we see that there is already a method defined for us. Lets write our method that will a random number between 1 and 6.

```ruby
def roll
rand(1..6)
end
```

`rand(1..6)` will give us every time a random number between the number 1 and 6 including the 6.

All the four tests should be passing now.
2 changes: 1 addition & 1 deletion dice_roll.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
# Feel free to google "how to generate a random number in ruby"

def roll
# code goes here
rand(1..6)
end