solitaire game
-
I am a beginner in programming and have to write a solitaire program(C++) just like what we play in windows. I have no idea where or how I should start my program. I never write a game in any computer language and I have already stuck at the beginning for 2 weeks. Can you help?? btw I just need to finish the game logic and give it to my teammate to work on graphic(GUI). now I just write a few line about checking whether the move in those 7 piles are valid or not and create 52 cards in a class by using array but cannot generate each card uniquely.
-
I am a beginner in programming and have to write a solitaire program(C++) just like what we play in windows. I have no idea where or how I should start my program. I never write a game in any computer language and I have already stuck at the beginning for 2 weeks. Can you help?? btw I just need to finish the game logic and give it to my teammate to work on graphic(GUI). now I just write a few line about checking whether the move in those 7 piles are valid or not and create 52 cards in a class by using array but cannot generate each card uniquely.
That is not a simple question to answer in a forum like this. You should start with a couple of classes: Card - contains properties such as value and suit. Player - contains a List of cards. Some general methods: A randomiser that deals the cards around. Play that selects a card and figures out where it can be placed etc. Quite a lot to think about before you start coding, or worrying about the UI.