File tree Expand file tree Collapse file tree 1 file changed +0
-16
lines changed Expand file tree Collapse file tree 1 file changed +0
-16
lines changed Original file line number Diff line number Diff line change @@ -130,22 +130,6 @@ puts "Total time #{duration} seconds"
130
130
puts " #{ duration/ turns } seconds per problem"
131
131
```
132
132
133
- ### Bonus
134
-
135
- At the beginning of the game ask for the number of turns. If return is pressed default to 0.
136
-
137
- > To default value of a variable, only if the variable empty you can use the ` ||= ` operant. This is called lazy loading.
138
-
139
- ``` ruby
140
- # here the number will get assigned to 1 as its value is nil
141
- number = nil
142
- number ||= 1
143
-
144
- # The number will not get assigned to 1 because it already has a value
145
- number = 2
146
- number ||= 1
147
- ```
148
-
149
133
## Reading and writing to a file
150
134
151
135
In Ruby we can use the ` File ` object to read and write to files.
You can’t perform that action at this time.
0 commit comments