Dice pool creation.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2023-12-03 15:32:32 -05:00
parent 3da183fe80
commit dd23cd83d5
5 changed files with 14 additions and 2 deletions

View File

@ -0,0 +1,3 @@
accessing
dice: anArray
dice := anArray

View File

@ -1,3 +1,3 @@
accessing accessing
dice dice
^ dice ifNil: [dice := Array with: (Die with: 6) with: (Die with: 6) ] ^ dice ifNil: [dice := Array new ]

View File

@ -0,0 +1,4 @@
accessing
with: fistInteger with: secondInteger
self dice: (Array with: (Die with: fistInteger) with: (Die with: secondInteger))

View File

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

View File

@ -1,3 +1,3 @@
accessing accessing
dice dice
^ dice ifNil: [ dice := DicePool new ] ^ dice ifNil: [ dice := DicePool new with: 6 with: 6 ]