Dice pool creation.
This commit is contained in:
parent
3da183fe80
commit
dd23cd83d5
3
RoloLudo.package/DicePool.class/instance/dice..st
Normal file
3
RoloLudo.package/DicePool.class/instance/dice..st
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
accessing
|
||||||
|
dice: anArray
|
||||||
|
dice := anArray
|
@ -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 ]
|
4
RoloLudo.package/DicePool.class/instance/with.with..st
Normal file
4
RoloLudo.package/DicePool.class/instance/with.with..st
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
accessing
|
||||||
|
with: fistInteger with: secondInteger
|
||||||
|
|
||||||
|
self dice: (Array with: (Die with: fistInteger) with: (Die with: secondInteger))
|
5
RoloLudo.package/Die.class/instance/printOn..st
Normal file
5
RoloLudo.package/Die.class/instance/printOn..st
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
accessing
|
||||||
|
printOn: aStream
|
||||||
|
super initialize.
|
||||||
|
aStream
|
||||||
|
nextPutAll: self faces asString
|
@ -1,3 +1,3 @@
|
|||||||
accessing
|
accessing
|
||||||
dice
|
dice
|
||||||
^ dice ifNil: [ dice := DicePool new ]
|
^ dice ifNil: [ dice := DicePool new with: 6 with: 6 ]
|
Loading…
Reference in New Issue
Block a user