Skip to main content

Timeline for Simple casino game

Current License: CC BY-SA 4.0

16 events
when toggle format what by license comment
Aug 28, 2024 at 19:43 comment added Hashim Aziz Hi River, you misunderstood, in the resource you read main was just being used an example - any method that you call in this way will eventually result in an overflow due to the error in logic that Confettimaker points out.
Aug 28, 2024 at 10:50 answer added Toby Speight timeline score: 5
Aug 28, 2024 at 4:11 comment added River Scheepens I forgot where because it was while ago. I didnt read that main2 wouldnt stack overflow that was just my workaround to call something other than main.
Aug 28, 2024 at 2:50 history became hot network question
Aug 27, 2024 at 23:53 answer added Confettimaker timeline score: 4
Aug 27, 2024 at 23:40 answer added Justin Chang timeline score: 7
Aug 27, 2024 at 23:31 comment added ggorlen @RiverScheepens Where did you read that main2 won't stack overflow but main will?
Aug 27, 2024 at 21:09 comment added Confettimaker That will happen in your implementation as well. main2 calls numberguess which in turn calls main2 which calls numberguess, into infinity. Consider returning back to main when the player loses a game and requesting user input for what game they want to play next in a loop like you do to get bets. I’ll be on my computer in a bit and I will write up my full review.
Aug 27, 2024 at 21:00 comment added River Scheepens @Confettimaker I did the main2() because I read it would cause a stack overflow if I call main(). Is this right?
Aug 27, 2024 at 19:40 history edited Toby Speight CC BY-SA 4.0
Move description to front, and simplify title
Aug 27, 2024 at 19:30 comment added Confettimaker Nice first question! I can’t go too in depth at the moment because I’m on mobile so I’ll just leave some quick tips. Your code would be more readable if you moved your global declarations to the top of the file together, including function headers. I can take a better look later and help you with getting around calling main2() from the other functions. Also for now you can just put your main2 code into main and forget main2 altogether.
Aug 27, 2024 at 19:19 history edited toolic CC BY-SA 4.0
added 10 characters in body; edited tags
Aug 27, 2024 at 19:04 history edited River Scheepens CC BY-SA 4.0
added 83 characters in body
Aug 27, 2024 at 18:52 history edited River Scheepens CC BY-SA 4.0
added 230 characters in body
S Aug 27, 2024 at 18:45 review First questions
Aug 27, 2024 at 18:47
S Aug 27, 2024 at 18:45 history asked River Scheepens CC BY-SA 4.0