7 lines
139 B
Smalltalk
7 lines
139 B
Smalltalk
|
accessing
|
||
|
roll
|
||
|
| diceRoll |
|
||
|
diceRoll := 100 atRandom.
|
||
|
self options keysAndValuesDo: [:k :v |
|
||
|
(k includes: diceRoll) ifTrue: [ ^ v ]
|
||
|
]
|