Open vanerichard opened 3 years ago
Yes I agree. To duplicate the actual slot machine game as described in the text, there needs to be a little more logic so that, for example, "7", "7", "DD" is regarded as a "win" with three of the "same" symbol. Also the same applies to the prize for "all bars": "B", "BBB", "DD" should score a prize for all bars, allowing for the wild card status of diamonds, but doesn't with the existing suggested coding.
Further to my previous comment, having now read the rest of the book (in particular, Section 11 on loops) I now see that in Section 11.6 there is an exercise that is intended to produce code that will allow for diamonds being "wild". Even so, perhaps it is worth including a sentence in Section 9 noting that "diamonds" in Section 9 are not yet treated as "wild", but that this issue will be addressed in Section 11? That way, readers such as vaneric86 and myself won't be left in doubt as to the accuracy of the code in Section 9.
Sorry I referred in my previous comment to "Section 11.6" but actually what I meant was, "Exercise 11.6 in Section 11.3".
The slot machine project does not consider the diamonds as wild symbols, so that means that the only way to "duplicate" the prize is if you have 3 diamonds. I don't know if this was intentional.