RoloLudo/RoloLudo.package/DicePool.class/instance/uiDiceFor..st

14 lines
407 B
Smalltalk

accessing
uiDiceFor: aView
<gtView>
| response currentRoll dicePool |
response := '' writeStream.
currentRoll := self roll.
dicePool := self dice collect: [:each | each faces ].
response
nextPutAll: 'Dice: ', dicePool printString ; cr;
nextPutAll: 'Roll: ', currentRoll printString; cr;
nextPutAll: 'Sum: ', currentRoll sum asString.
^ aView text
title: 'Dice';
text: [ response contents ]