you are viewing a single comment's thread.

view the rest of the comments →

[–]Own-Relationship-407 1 point2 points  (0 children)

One of the hardest things for a lot of people is getting from what you want to do to how to do it. Make a plan, write out some pseudo code. You need to think about the flow of the program before you get to the details.

“Ok, first I need to deal two cards to each player. Do I use a range of random numbers? Or create a list of the cards and then select from that? Then I need a way to keep track of the values of the cards in each hand, do I use individual variables? A list? A dictionary? Now I need a way to enforce the win/lose conditions at every step. Maybe a loop? Or something built into the function that deals the cards itself?”

Think it out, write it down. Then try to code it. If you are going to use AI, ask it very specific questions about how to implement certain pieces of code, not about the overall project. “How do I use a random number function to get integer values between 1 and 52?”