Skip to main content
10 events
when toggle format what by license comment
Jan 3, 2022 at 6:07 comment added chux @Maxell It is not that I am looking for a comment to my answer, it is that if your "stands for values with probability, and it represents two decks of cards." was a comment in your code near int values_w_p [][2] = { {2,8},..., then your code gain in clarity. Often a one line comment about a cryptic variable name is all that is needed.
Jan 2, 2022 at 23:50 comment added Maxell First of all thank you for the really great feedback, and yes my code looks a bit messy. Some additions: int values_w_p [][2] stands for values with probability, and it represents two decks of cards. Every sub-array represents how many "values" are in the two decks. That's why I used values_w_p[yourcard-2][1] -= 1; because if you draw a card one card is out of the decks, probably it's not the best way to do that, but that's the best solution I came up with. Based on the array values_w_p int *actValue(int values[][2]) calculates "all of the cards."
Dec 31, 2021 at 23:35 history edited chux CC BY-SA 4.0
deleted 3 characters in body
Dec 31, 2021 at 19:20 history edited chux CC BY-SA 4.0
added 73 characters in body
Dec 30, 2021 at 22:42 history edited chux CC BY-SA 4.0
added 1914 characters in body
Dec 30, 2021 at 22:37 history edited chux CC BY-SA 4.0
added 1914 characters in body
Dec 30, 2021 at 22:30 history edited chux CC BY-SA 4.0
added 1914 characters in body
Dec 30, 2021 at 21:40 history edited chux CC BY-SA 4.0
added 985 characters in body
Dec 30, 2021 at 21:35 history edited chux CC BY-SA 4.0
added 985 characters in body
Dec 30, 2021 at 18:00 history answered chux CC BY-SA 4.0