Put your new skills to work by creating a reactive algorithm to deal hands of blackjack.
This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4743-beginning-rxswift/lessons/10
Put your new skills to work by creating a reactive algorithm to deal hands of blackjack.
Iβm getting problems with the lookup of the symbols for RxSwift in the playground for lesson 6 and lesson 8. This is the error for lesson 8:
Playground execution failed:
error: Couldn't lookup symbols:
__T07RxSwift14PublishSubjectCMa
__T07RxSwift10DisposeBagCACycfC
__T07RxSwift14PublishSubjectCACyxGycfC
__T07RxSwift10DisposeBagCMa
Hi @nightfox50, this is due to an issue with Xcode and CocoaPods. Here are some suggestions and I hope one of them resolves the issue for you. First, check that you have a simulator selected and not an actual device for your active scheme. If that doesnβt work, check out these threads for some possible other resolutions or alternative approachesβ¦
Hello,
Iβve called deal function multiple times, one time, the points is over 21 so, it return with Error Busted. But it still continue to run the below deal function. I thought, once publishSubject emitted by Error, it should terminate. May I know why the function continue to run after returning with Error.
deal(1)
deal(2)
deal(3)
deal(4)
deal(5)
---- PublishSubject ----
deal for card count = 1
dealHand: [("π", 7)] -> cards π with points 7
deal for card count = 2
dealHand: [(βπβ, 3), (βπ·β, 7)] β cards ππ· with points 10
deal for card count = 3
busted: [("π", 10), ("π
", 5), ("π·", 7)]
**error busted**
deal for card count = 4
busted: [(βπβ, 4), (βπ±β, 11), (βπβ, 10), (βπΉβ, 9)]
deal for card count = 5
busted: [("π·", 7), ("π", 10), ("π", 7), ("π΄", 4), ("π
", 5)]