Recovering game reseting from last crash.
This commit is contained in:
parent
7772524569
commit
014eba5937
@ -1,3 +1,6 @@
|
||||
accessing
|
||||
draw: aCollection
|
||||
drawn := aCollection
|
||||
draw: card
|
||||
self stock
|
||||
detect: [ :each | each = card ]
|
||||
ifFound: [self drawn add: card ]
|
||||
ifNone: [ ^ nil ]
|
3
RoloLudo.package/DeckOfCards.class/instance/drawAll..st
Normal file
3
RoloLudo.package/DeckOfCards.class/instance/drawAll..st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
drawAll: aCollection
|
||||
self drawn addAll: aCollection
|
3
RoloLudo.package/DeckOfCards.class/instance/drawn..st
Normal file
3
RoloLudo.package/DeckOfCards.class/instance/drawn..st
Normal file
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
drawn: aCollection
|
||||
drawn := aCollection
|
@ -1,5 +1,5 @@
|
||||
accessing
|
||||
reset
|
||||
self draw: OrderedCollection new.
|
||||
self drawn: OrderedCollection new.
|
||||
self cards: self class initialize cards.
|
||||
^ self
|
Loading…
Reference in New Issue
Block a user