first try

Philip Miess via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Mar 17 18:27:42 PDT 2017


On Thu, 16 Mar 2017 19:53:08 -0700, Ali Çehreli wrote:
> It looks pretty good to me.
> 
> - All capital letters? Yuck! :)
> 
> - Typo: DOLLERS
> 
> - It's better to declare and define variables at the same time:
> 
>    int bet = inputInt( "\nWHAT IS YOUR BET"); int card1 = uniform(2, 15,
>    rnd);
> 
> That way, you can make the variables const if you care:
> 
>    const bet = inputInt( "\nWHAT IS YOUR BET");
>    const card1 = uniform(2, 15, rnd);
> 
> - I liked the functional style of programming like stakes goes into
> aceyducyHand and then comes out as return value.
> 
> - I've also learned something: It was interesting how getBet() and
> aceyducyGames() are handled recursively.
> 
> Ali

Ali,
   I appreciate your taking the time to look.
It was all caps in the original, but your right that looks awful so I've 
lower cased the messages and fixed the typo.
I also merged the declarations into the first usage and made some of the 
variables constants.

Thank you,
Phil



More information about the Digitalmars-d-learn mailing list