Rolling dice support started.
This commit is contained in:
parent
a9d376b36c
commit
3da183fe80
0
RoloLudo.package/DicePool.class/README.md
Normal file
0
RoloLudo.package/DicePool.class/README.md
Normal file
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
|
||||
^ dice ifNil: [dice := Array with: (Die with: 6) with: (Die with: 6) ]
|
3
RoloLudo.package/DicePool.class/instance/roll.st
Normal file
3
RoloLudo.package/DicePool.class/instance/roll.st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
roll
|
||||
^ self dice collect: [:each | each roll ]
|
13
RoloLudo.package/DicePool.class/properties.json
Normal file
13
RoloLudo.package/DicePool.class/properties.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"commentStamp" : "",
|
||||
"super" : "Object",
|
||||
"category" : "RoloLudo",
|
||||
"classinstvars" : [ ],
|
||||
"pools" : [ ],
|
||||
"classvars" : [ ],
|
||||
"instvars" : [
|
||||
"dice"
|
||||
],
|
||||
"name" : "DicePool",
|
||||
"type" : "normal"
|
||||
}
|
0
RoloLudo.package/Die.class/README.md
Normal file
0
RoloLudo.package/Die.class/README.md
Normal file
4
RoloLudo.package/Die.class/class/with..st
Normal file
4
RoloLudo.package/Die.class/class/with..st
Normal file
@ -0,0 +1,4 @@
|
||||
accessing
|
||||
with: anInteger
|
||||
^ self new
|
||||
faces: anInteger
|
3
RoloLudo.package/Die.class/instance/faces..st
Normal file
3
RoloLudo.package/Die.class/instance/faces..st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
faces: anInteger
|
||||
faces := anInteger
|
3
RoloLudo.package/Die.class/instance/faces.st
Normal file
3
RoloLudo.package/Die.class/instance/faces.st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
faces
|
||||
^ faces
|
3
RoloLudo.package/Die.class/instance/roll.st
Normal file
3
RoloLudo.package/Die.class/instance/roll.st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
roll
|
||||
^ self faces atRandom
|
13
RoloLudo.package/Die.class/properties.json
Normal file
13
RoloLudo.package/Die.class/properties.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"commentStamp" : "",
|
||||
"super" : "Object",
|
||||
"category" : "RoloLudo",
|
||||
"classinstvars" : [ ],
|
||||
"pools" : [ ],
|
||||
"classvars" : [ ],
|
||||
"instvars" : [
|
||||
"faces"
|
||||
],
|
||||
"name" : "Die",
|
||||
"type" : "normal"
|
||||
}
|
3
RoloLudo.package/Firelights.class/instance/dice.st
Normal file
3
RoloLudo.package/Firelights.class/instance/dice.st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
dice
|
||||
^ dice ifNil: [ dice := DicePool new ]
|
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
loadOraclesFromRepository
|
||||
^ STON fromString: 'https://mutabit.com/repos.fossil/502Lab/raw/f0c299?at=oracles.ston' asUrl retrieveContents utf8Decoded
|
@ -1,3 +1,3 @@
|
||||
accessing
|
||||
oracles
|
||||
^ oracles ifNil: [ oracles := self loadOraclesFromWikiTemplate]
|
||||
^ oracles ifNil: [ oracles := self loadOraclesFromRepository]
|
3
RoloLudo.package/Firelights.class/instance/roll.st
Normal file
3
RoloLudo.package/Firelights.class/instance/roll.st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
roll
|
||||
^ self dice roll
|
Loading…
Reference in New Issue
Block a user