2023-12-03 22:40:36 +00:00
|
|
|
accessing
|
|
|
|
uiDiceFor: aView
|
|
|
|
<gtView>
|
2023-12-06 12:41:39 +00:00
|
|
|
| response currentRoll dicePool |
|
2023-12-03 22:40:36 +00:00
|
|
|
response := '' writeStream.
|
|
|
|
currentRoll := self roll.
|
2023-12-06 12:41:39 +00:00
|
|
|
dicePool := self dice collect: [:each | each faces ].
|
2023-12-03 22:40:36 +00:00
|
|
|
response
|
2023-12-06 12:41:39 +00:00
|
|
|
nextPutAll: 'Dice: ', dicePool printString ; cr;
|
|
|
|
nextPutAll: 'Roll: ', currentRoll printString; cr;
|
|
|
|
nextPutAll: 'Sum: ', currentRoll sum asString.
|
2023-12-03 22:40:36 +00:00
|
|
|
^ aView text
|
|
|
|
title: 'Dice';
|
|
|
|
text: [ response contents ]
|