Hello. I have been studying C # for the last 2 weeks, I haven’t had previous programming experience. Used textbook Microsoft Visual C # 2008 under the authorship of K. Utson and K ... In the process of studying I got to the task:
Write a client console application for the Ch10CardLib library, pulling at once five cards from the shuffled deck (the Deck object). In case all five cards belong to the same suit, this client application should display their names on the screen in the place with the text "Flush!" (Flash!); otherwise, it should stop working after viewing 50 cards with the text "No flush".
As I understand it, the algorithm should be something like this (with already prepared objects, methods, and a library):
- "Draw 5 cards (alternately, because I do not know at the same time) cards from Deck"
- Save them to an array
- Compare the suits in the array itself or output the elements of the array into separate variables and compare them already
- Well, respectively, if there are matches in the suits "give out" Flash "," if not, "give out" No Flash "."
Is my decision method correct and what errors are there (for some reason I am sure there are not enough of them in it). Waiting for your tips. I would not like to receive a ready solution because I want to walk myself.