Default UI.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2023-12-03 17:40:36 -05:00
parent dd23cd83d5
commit 6bfb07dba9
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,5 @@
accessing
printOn: aStream
super initialize.
aStream
nextPutAll: self dice printString

View File

@ -0,0 +1,12 @@
accessing
uiDiceFor: aView
<gtView>
| response currentRoll |
response := '' writeStream.
currentRoll := self roll.
response
nextPutAll: 'Rolls: ', currentRoll printString; cr;
nextPutAll: 'Sums: ', currentRoll sum asString.
^ aView text
title: 'Dice';
text: [ response contents ]